mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 16:22:07 +07:00
software node: Use software_node_unregister() when unregistering group of nodes
After the commit
46d26819a5
("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 <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200622082108.25577-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0d989da36b
commit
9dcbac8424
@ -761,17 +761,13 @@ EXPORT_SYMBOL_GPL(software_node_register_node_group);
|
|||||||
*/
|
*/
|
||||||
void software_node_unregister_node_group(const struct software_node **node_group)
|
void software_node_unregister_node_group(const struct software_node **node_group)
|
||||||
{
|
{
|
||||||
struct swnode *swnode;
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
if (!node_group)
|
if (!node_group)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; node_group[i]; i++) {
|
for (i = 0; node_group[i]; i++)
|
||||||
swnode = software_node_to_swnode(node_group[i]);
|
software_node_unregister(node_group[i]);
|
||||||
if (swnode)
|
|
||||||
fwnode_remove_software_node(&swnode->fwnode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(software_node_unregister_node_group);
|
EXPORT_SYMBOL_GPL(software_node_unregister_node_group);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user