Lines Matching full: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
168 dn = dlpar_parse_cc_node(ccwa); in dlpar_configure_connector()
169 if (!dn) in dlpar_configure_connector()
172 dn->parent = last_dn->parent; in dlpar_configure_connector()
173 last_dn->sibling = dn; in dlpar_configure_connector()
174 last_dn = dn; in dlpar_configure_connector()
178 dn = dlpar_parse_cc_node(ccwa); in dlpar_configure_connector()
179 if (!dn) in dlpar_configure_connector()
183 dn->parent = parent; in dlpar_configure_connector()
184 first_dn = dn; in dlpar_configure_connector()
186 dn->parent = last_dn; in dlpar_configure_connector()
188 last_dn->child = dn; in dlpar_configure_connector()
191 last_dn = dn; in dlpar_configure_connector()
233 int dlpar_attach_node(struct device_node *dn, struct device_node *parent) in dlpar_attach_node() argument
237 dn->parent = parent; in dlpar_attach_node()
239 rc = of_attach_node(dn); in dlpar_attach_node()
241 printk(KERN_ERR "Failed to add device node %pOF\n", dn); in dlpar_attach_node()
248 int dlpar_detach_node(struct device_node *dn) in dlpar_detach_node() argument
253 child = of_get_next_child(dn, NULL); in dlpar_detach_node()
256 child = of_get_next_child(dn, child); in dlpar_detach_node()
259 rc = of_detach_node(dn); in dlpar_detach_node()
263 of_node_put(dn); in dlpar_detach_node()