Lines Matching refs:np
25 struct device_node *np; in pSeries_reconfig_add_node() local
28 np = kzalloc(sizeof(*np), GFP_KERNEL); in pSeries_reconfig_add_node()
29 if (!np) in pSeries_reconfig_add_node()
32 np->full_name = kstrdup(kbasename(path), GFP_KERNEL); in pSeries_reconfig_add_node()
33 if (!np->full_name) in pSeries_reconfig_add_node()
36 np->properties = proplist; in pSeries_reconfig_add_node()
37 of_node_set_flag(np, OF_DYNAMIC); in pSeries_reconfig_add_node()
38 of_node_init(np); in pSeries_reconfig_add_node()
40 np->parent = pseries_of_derive_parent(path); in pSeries_reconfig_add_node()
41 if (IS_ERR(np->parent)) { in pSeries_reconfig_add_node()
42 err = PTR_ERR(np->parent); in pSeries_reconfig_add_node()
46 err = of_attach_node(np); in pSeries_reconfig_add_node()
52 of_node_put(np->parent); in pSeries_reconfig_add_node()
57 if (np) { in pSeries_reconfig_add_node()
58 of_node_put(np->parent); in pSeries_reconfig_add_node()
59 kfree(np->full_name); in pSeries_reconfig_add_node()
60 kfree(np); in pSeries_reconfig_add_node()
65 static int pSeries_reconfig_remove_node(struct device_node *np) in pSeries_reconfig_remove_node() argument
69 parent = of_get_parent(np); in pSeries_reconfig_remove_node()
73 if ((child = of_get_next_child(np, NULL))) { in pSeries_reconfig_remove_node()
79 of_detach_node(np); in pSeries_reconfig_remove_node()
197 struct device_node *np; in do_add_node() local
210 if ((np = of_find_node_by_path(path))) { in do_add_node()
211 of_node_put(np); in do_add_node()
275 struct device_node *np; in do_add_property() local
280 buf = parse_node(buf, bufsize, &np); in do_add_property()
282 if (!np) in do_add_property()
292 of_add_property(np, prop); in do_add_property()
299 struct device_node *np; in do_remove_property() local
301 buf = parse_node(buf, bufsize, &np); in do_remove_property()
303 if (!np) in do_remove_property()
313 return of_remove_property(np, of_find_property(np, buf, NULL)); in do_remove_property()
318 struct device_node *np; in do_update_property() local
323 buf = parse_node(buf, bufsize, &np); in do_update_property()
326 if (!np) in do_update_property()
343 return of_update_property(np, newprop); in do_update_property()