Lines Matching refs:dn

78 	struct device_node *dn;  in dlpar_parse_cc_node()  local
81 dn = kzalloc(sizeof(*dn), GFP_KERNEL); in dlpar_parse_cc_node()
82 if (!dn) in dlpar_parse_cc_node()
86 dn->full_name = kstrdup(name, GFP_KERNEL); in dlpar_parse_cc_node()
87 if (!dn->full_name) { in dlpar_parse_cc_node()
88 kfree(dn); in dlpar_parse_cc_node()
92 of_node_set_flag(dn, OF_DYNAMIC); in dlpar_parse_cc_node()
93 of_node_init(dn); in dlpar_parse_cc_node()
95 return dn; in dlpar_parse_cc_node()
98 static void dlpar_free_one_cc_node(struct device_node *dn) in dlpar_free_one_cc_node() argument
102 while (dn->properties) { in dlpar_free_one_cc_node()
103 prop = dn->properties; in dlpar_free_one_cc_node()
104 dn->properties = prop->next; in dlpar_free_one_cc_node()
108 kfree(dn->full_name); in dlpar_free_one_cc_node()
109 kfree(dn); in dlpar_free_one_cc_node()
112 void dlpar_free_cc_nodes(struct device_node *dn) in dlpar_free_cc_nodes() argument
114 if (dn->child) in dlpar_free_cc_nodes()
115 dlpar_free_cc_nodes(dn->child); in dlpar_free_cc_nodes()
117 if (dn->sibling) in dlpar_free_cc_nodes()
118 dlpar_free_cc_nodes(dn->sibling); in dlpar_free_cc_nodes()
120 dlpar_free_one_cc_node(dn); in dlpar_free_cc_nodes()
134 struct device_node *dn; in dlpar_configure_connector() local
177 dn = dlpar_parse_cc_node(ccwa); in dlpar_configure_connector()
178 if (!dn) in dlpar_configure_connector()
181 dn->parent = last_dn->parent; in dlpar_configure_connector()
182 last_dn->sibling = dn; in dlpar_configure_connector()
183 last_dn = dn; in dlpar_configure_connector()
187 dn = dlpar_parse_cc_node(ccwa); in dlpar_configure_connector()
188 if (!dn) in dlpar_configure_connector()
192 dn->parent = parent; in dlpar_configure_connector()
193 first_dn = dn; in dlpar_configure_connector()
195 dn->parent = last_dn; in dlpar_configure_connector()
197 last_dn->child = dn; in dlpar_configure_connector()
200 last_dn = dn; in dlpar_configure_connector()
242 int dlpar_attach_node(struct device_node *dn, struct device_node *parent) in dlpar_attach_node() argument
246 dn->parent = parent; in dlpar_attach_node()
248 rc = of_attach_node(dn); in dlpar_attach_node()
250 printk(KERN_ERR "Failed to add device node %pOF\n", dn); in dlpar_attach_node()
257 int dlpar_detach_node(struct device_node *dn) in dlpar_detach_node() argument
262 child = of_get_next_child(dn, NULL); in dlpar_detach_node()
265 child = of_get_next_child(dn, child); in dlpar_detach_node()
268 rc = of_detach_node(dn); in dlpar_detach_node()
272 of_node_put(dn); in dlpar_detach_node()