• Home
  • Raw
  • Download

Lines Matching refs:dn

85 	struct device_node *dn;  in dlpar_parse_cc_node()  local
94 dn = kzalloc(sizeof(*dn), GFP_KERNEL); in dlpar_parse_cc_node()
95 if (!dn) in dlpar_parse_cc_node()
99 dn->full_name = kasprintf(GFP_KERNEL, "%s/%s", path, name); in dlpar_parse_cc_node()
100 if (!dn->full_name) { in dlpar_parse_cc_node()
101 kfree(dn); in dlpar_parse_cc_node()
105 of_node_set_flag(dn, OF_DYNAMIC); in dlpar_parse_cc_node()
106 of_node_init(dn); in dlpar_parse_cc_node()
108 return dn; in dlpar_parse_cc_node()
111 static void dlpar_free_one_cc_node(struct device_node *dn) in dlpar_free_one_cc_node() argument
115 while (dn->properties) { in dlpar_free_one_cc_node()
116 prop = dn->properties; in dlpar_free_one_cc_node()
117 dn->properties = prop->next; in dlpar_free_one_cc_node()
121 kfree(dn->full_name); in dlpar_free_one_cc_node()
122 kfree(dn); in dlpar_free_one_cc_node()
125 void dlpar_free_cc_nodes(struct device_node *dn) in dlpar_free_cc_nodes() argument
127 if (dn->child) in dlpar_free_cc_nodes()
128 dlpar_free_cc_nodes(dn->child); in dlpar_free_cc_nodes()
130 if (dn->sibling) in dlpar_free_cc_nodes()
131 dlpar_free_cc_nodes(dn->sibling); in dlpar_free_cc_nodes()
133 dlpar_free_one_cc_node(dn); in dlpar_free_cc_nodes()
148 struct device_node *dn; in dlpar_configure_connector() local
189 dn = dlpar_parse_cc_node(ccwa, parent_path); in dlpar_configure_connector()
190 if (!dn) in dlpar_configure_connector()
193 dn->parent = last_dn->parent; in dlpar_configure_connector()
194 last_dn->sibling = dn; in dlpar_configure_connector()
195 last_dn = dn; in dlpar_configure_connector()
202 dn = dlpar_parse_cc_node(ccwa, parent_path); in dlpar_configure_connector()
203 if (!dn) in dlpar_configure_connector()
207 dn->parent = parent; in dlpar_configure_connector()
208 first_dn = dn; in dlpar_configure_connector()
210 dn->parent = last_dn; in dlpar_configure_connector()
212 last_dn->child = dn; in dlpar_configure_connector()
215 last_dn = dn; in dlpar_configure_connector()
261 int dlpar_attach_node(struct device_node *dn, struct device_node *parent) in dlpar_attach_node() argument
265 dn->parent = parent; in dlpar_attach_node()
267 rc = of_attach_node(dn); in dlpar_attach_node()
269 printk(KERN_ERR "Failed to add device node %pOF\n", dn); in dlpar_attach_node()
276 int dlpar_detach_node(struct device_node *dn) in dlpar_detach_node() argument
281 child = of_get_next_child(dn, NULL); in dlpar_detach_node()
284 child = of_get_next_child(dn, child); in dlpar_detach_node()
287 rc = of_detach_node(dn); in dlpar_detach_node()
291 of_node_put(dn); in dlpar_detach_node()