diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-03-06 15:50:26 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-03-06 15:50:26 +0300 |
commit | b0b8a945ea29166706611820e609bce23e278f6b (patch) | |
tree | 5fd4b02ab08199302944339cbcd11df82c611d7d /drivers | |
parent | fe67d1821fa8cd9856fc5e65d53ef73b450fa7d8 (diff) | |
parent | 7589238a8cf37331607c3222a64ac3140b29532d (diff) | |
download | linux-b0b8a945ea29166706611820e609bce23e278f6b.tar.xz |
Merge tag 'devprop-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull device properties framework fix from Rafael Wysocki:
"Revert a problematic commit from the 5.3 development cycle (Brendan
Higgins)"
* tag 'devprop-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
Revert "software node: Simplify software_node_release() function"
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/swnode.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c index 0b081dee1e95..de8d3543e8fe 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -608,6 +608,13 @@ static void software_node_release(struct kobject *kobj) { struct swnode *swnode = kobj_to_swnode(kobj); + if (swnode->parent) { + ida_simple_remove(&swnode->parent->child_ids, swnode->id); + list_del(&swnode->entry); + } else { + ida_simple_remove(&swnode_root_ids, swnode->id); + } + if (swnode->allocated) { property_entries_free(swnode->node->properties); kfree(swnode->node); @@ -773,13 +780,6 @@ void fwnode_remove_software_node(struct fwnode_handle *fwnode) if (!swnode) return; - if (swnode->parent) { - ida_simple_remove(&swnode->parent->child_ids, swnode->id); - list_del(&swnode->entry); - } else { - ida_simple_remove(&swnode_root_ids, swnode->id); - } - kobject_put(&swnode->kobj); } EXPORT_SYMBOL_GPL(fwnode_remove_software_node); |