| .. | .. |
|---|
| 207 | 207 | |
|---|
| 208 | 208 | if (!of_node_check_flag(np, OF_OVERLAY)) { |
|---|
| 209 | 209 | np->name = __of_get_property(np, "name", NULL); |
|---|
| 210 | | - np->type = __of_get_property(np, "device_type", NULL); |
|---|
| 211 | 210 | if (!np->name) |
|---|
| 212 | 211 | np->name = "<NULL>"; |
|---|
| 213 | | - if (!np->type) |
|---|
| 214 | | - np->type = "<NULL>"; |
|---|
| 215 | 212 | |
|---|
| 216 | 213 | phandle = __of_get_property(np, "phandle", &sz); |
|---|
| 217 | 214 | if (!phandle) |
|---|
| .. | .. |
|---|
| 279 | 276 | of_node_set_flag(np, OF_DETACHED); |
|---|
| 280 | 277 | |
|---|
| 281 | 278 | /* race with of_find_node_by_phandle() prevented by devtree_lock */ |
|---|
| 282 | | - __of_free_phandle_cache_entry(np->phandle); |
|---|
| 279 | + __of_phandle_cache_inv_entry(np->phandle); |
|---|
| 283 | 280 | } |
|---|
| 284 | 281 | |
|---|
| 285 | 282 | /** |
|---|
| .. | .. |
|---|
| 289 | 286 | { |
|---|
| 290 | 287 | struct of_reconfig_data rd; |
|---|
| 291 | 288 | unsigned long flags; |
|---|
| 292 | | - int rc = 0; |
|---|
| 293 | 289 | |
|---|
| 294 | 290 | memset(&rd, 0, sizeof(rd)); |
|---|
| 295 | 291 | rd.dn = np; |
|---|
| .. | .. |
|---|
| 304 | 300 | |
|---|
| 305 | 301 | of_reconfig_notify(OF_RECONFIG_DETACH_NODE, &rd); |
|---|
| 306 | 302 | |
|---|
| 307 | | - return rc; |
|---|
| 303 | + return 0; |
|---|
| 308 | 304 | } |
|---|
| 309 | 305 | EXPORT_SYMBOL_GPL(of_detach_node); |
|---|
| 310 | 306 | |
|---|
| .. | .. |
|---|
| 360 | 356 | |
|---|
| 361 | 357 | property_list_free(node->properties); |
|---|
| 362 | 358 | property_list_free(node->deadprops); |
|---|
| 359 | + fwnode_links_purge(of_fwnode_handle(node)); |
|---|
| 363 | 360 | |
|---|
| 364 | 361 | kfree(node->full_name); |
|---|
| 365 | 362 | kfree(node->data); |
|---|