Lines Matching full:dn

80 	struct device_node *dn;  in dlpar_parse_cc_node()  local
83 dn = kzalloc(sizeof(*dn), GFP_KERNEL); in dlpar_parse_cc_node()
84 if (!dn) in dlpar_parse_cc_node()
88 dn->full_name = kstrdup(name, GFP_KERNEL); in dlpar_parse_cc_node()
89 if (!dn->full_name) { in dlpar_parse_cc_node()
90 kfree(dn); in dlpar_parse_cc_node()
94 of_node_set_flag(dn, OF_DYNAMIC); in dlpar_parse_cc_node()
95 of_node_init(dn); in dlpar_parse_cc_node()
97 return dn; in dlpar_parse_cc_node()
100 static void dlpar_free_one_cc_node(struct device_node *dn) in dlpar_free_one_cc_node() argument
104 while (dn->properties) { in dlpar_free_one_cc_node()
105 prop = dn->properties; in dlpar_free_one_cc_node()
106 dn->properties = prop->next; in dlpar_free_one_cc_node()
110 kfree(dn->full_name); in dlpar_free_one_cc_node()
111 kfree(dn); in dlpar_free_one_cc_node()
114 void dlpar_free_cc_nodes(struct device_node *dn) in dlpar_free_cc_nodes() argument
116 if (dn->child) in dlpar_free_cc_nodes()
117 dlpar_free_cc_nodes(dn->child); in dlpar_free_cc_nodes()
119 if (dn->sibling) in dlpar_free_cc_nodes()
120 dlpar_free_cc_nodes(dn->sibling); in dlpar_free_cc_nodes()
122 dlpar_free_one_cc_node(dn); in dlpar_free_cc_nodes()
136 struct device_node *dn; in dlpar_configure_connector() local
169 dn = dlpar_parse_cc_node(ccwa); in dlpar_configure_connector()
170 if (!dn) in dlpar_configure_connector()
173 dn->parent = last_dn->parent; in dlpar_configure_connector()
174 last_dn->sibling = dn; in dlpar_configure_connector()
175 last_dn = dn; in dlpar_configure_connector()
179 dn = dlpar_parse_cc_node(ccwa); in dlpar_configure_connector()
180 if (!dn) in dlpar_configure_connector()
184 dn->parent = parent; in dlpar_configure_connector()
185 first_dn = dn; in dlpar_configure_connector()
187 dn->parent = last_dn; in dlpar_configure_connector()
189 last_dn->child = dn; in dlpar_configure_connector()
192 last_dn = dn; in dlpar_configure_connector()
234 int dlpar_attach_node(struct device_node *dn, struct device_node *parent) in dlpar_attach_node() argument
238 dn->parent = parent; in dlpar_attach_node()
240 rc = of_attach_node(dn); in dlpar_attach_node()
242 printk(KERN_ERR "Failed to add device node %pOF\n", dn); in dlpar_attach_node()
249 int dlpar_detach_node(struct device_node *dn) in dlpar_detach_node() argument
254 for_each_child_of_node(dn, child) in dlpar_detach_node()
257 rc = of_detach_node(dn); in dlpar_detach_node()
261 of_node_put(dn); in dlpar_detach_node()
266 struct device_node *dn) in dlpar_changeset_attach_cc_nodes() argument
270 rc = of_changeset_attach_node(ocs, dn); in dlpar_changeset_attach_cc_nodes()
272 if (!rc && dn->child) in dlpar_changeset_attach_cc_nodes()
273 rc = dlpar_changeset_attach_cc_nodes(ocs, dn->child); in dlpar_changeset_attach_cc_nodes()
274 if (!rc && dn->sibling) in dlpar_changeset_attach_cc_nodes()
275 rc = dlpar_changeset_attach_cc_nodes(ocs, dn->sibling); in dlpar_changeset_attach_cc_nodes()