From: Andy Shevchenko Date: Mon, 22 Jun 2020 08:21:08 +0000 (+0300) Subject: software node: Use software_node_unregister() when unregistering group of nodes X-Git-Tag: v5.10.7~1953^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9dcbac84244f32ef6b2d4ed47f37c8228450b57b;p=platform%2Fkernel%2Flinux-rpi.git software node: Use software_node_unregister() when unregistering group of nodes After the commit 46d26819a505 ("software node: implement software_node_unregister()") has been applied a new helper appears that may be utilised in other places. For time being there is one such place, i.e. in software_node_unregister_node_group() which will benefit of the clean up. Use software_node_unregister() when unregistering group of nodes. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200622082108.25577-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c index e5eb273..010828f 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -761,17 +761,13 @@ EXPORT_SYMBOL_GPL(software_node_register_node_group); */ void software_node_unregister_node_group(const struct software_node **node_group) { - struct swnode *swnode; unsigned int i; if (!node_group) return; - for (i = 0; node_group[i]; i++) { - swnode = software_node_to_swnode(node_group[i]); - if (swnode) - fwnode_remove_software_node(&swnode->fwnode); - } + for (i = 0; node_group[i]; i++) + software_node_unregister(node_group[i]); } EXPORT_SYMBOL_GPL(software_node_unregister_node_group);