Lines Matching refs:dn

79 	struct device_node *dn;  in dlpar_parse_cc_node()  local
82 dn = kzalloc(sizeof(*dn), GFP_KERNEL); in dlpar_parse_cc_node()
83 if (!dn) in dlpar_parse_cc_node()
87 dn->full_name = kstrdup(name, GFP_KERNEL); in dlpar_parse_cc_node()
88 if (!dn->full_name) { in dlpar_parse_cc_node()
89 kfree(dn); in dlpar_parse_cc_node()
93 of_node_set_flag(dn, OF_DYNAMIC); in dlpar_parse_cc_node()
94 of_node_init(dn); in dlpar_parse_cc_node()
96 return dn; in dlpar_parse_cc_node()
99 static void dlpar_free_one_cc_node(struct device_node *dn) in dlpar_free_one_cc_node() argument
103 while (dn->properties) { in dlpar_free_one_cc_node()
104 prop = dn->properties; in dlpar_free_one_cc_node()
105 dn->properties = prop->next; in dlpar_free_one_cc_node()
109 kfree(dn->full_name); in dlpar_free_one_cc_node()
110 kfree(dn); in dlpar_free_one_cc_node()
113 void dlpar_free_cc_nodes(struct device_node *dn) in dlpar_free_cc_nodes() argument
115 if (dn->child) in dlpar_free_cc_nodes()
116 dlpar_free_cc_nodes(dn->child); in dlpar_free_cc_nodes()
118 if (dn->sibling) in dlpar_free_cc_nodes()
119 dlpar_free_cc_nodes(dn->sibling); in dlpar_free_cc_nodes()
121 dlpar_free_one_cc_node(dn); in dlpar_free_cc_nodes()
135 struct device_node *dn; in dlpar_configure_connector() local
178 dn = dlpar_parse_cc_node(ccwa); in dlpar_configure_connector()
179 if (!dn) in dlpar_configure_connector()
182 dn->parent = last_dn->parent; in dlpar_configure_connector()
183 last_dn->sibling = dn; in dlpar_configure_connector()
184 last_dn = dn; in dlpar_configure_connector()
188 dn = dlpar_parse_cc_node(ccwa); in dlpar_configure_connector()
189 if (!dn) in dlpar_configure_connector()
193 dn->parent = parent; in dlpar_configure_connector()
194 first_dn = dn; in dlpar_configure_connector()
196 dn->parent = last_dn; in dlpar_configure_connector()
198 last_dn->child = dn; in dlpar_configure_connector()
201 last_dn = dn; in dlpar_configure_connector()
243 int dlpar_attach_node(struct device_node *dn, struct device_node *parent) in dlpar_attach_node() argument
247 dn->parent = parent; in dlpar_attach_node()
249 rc = of_attach_node(dn); in dlpar_attach_node()
251 printk(KERN_ERR "Failed to add device node %pOF\n", dn); in dlpar_attach_node()
258 int dlpar_detach_node(struct device_node *dn) in dlpar_detach_node() argument
263 child = of_get_next_child(dn, NULL); in dlpar_detach_node()
266 child = of_get_next_child(dn, child); in dlpar_detach_node()
269 rc = of_detach_node(dn); in dlpar_detach_node()
273 of_node_put(dn); in dlpar_detach_node()