aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@nvidia.com>2021-11-30 12:16:20 +0200
committerDavid S. Miller <davem@davemloft.net>2021-11-30 12:23:32 +0000
commit4c897cfc46a554a523343fc3296333c473a2fc52 (patch)
treefdc771cc5280bdf48bd2801cd9812c5bf51cfb35 /net/dsa
parentnet: mdio: mscc-miim: Set back the optional resource. (diff)
downloadlinux-dev-4c897cfc46a554a523343fc3296333c473a2fc52.tar.xz
linux-dev-4c897cfc46a554a523343fc3296333c473a2fc52.zip
devlink: Simplify devlink resources unregister call
The devlink_resources_unregister() used second parameter as an entry point for the recursive removal of devlink resources. None of the callers outside of devlink core needed to use this field, so let's remove it. As part of this removal, the "struct devlink_resource" was moved from .h to .c file as it is not possible to use in any place in the code except devlink.c. Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/dsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index ea5169e671ae..d9d0d227092c 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -406,7 +406,7 @@ EXPORT_SYMBOL_GPL(dsa_devlink_resource_register);
void dsa_devlink_resources_unregister(struct dsa_switch *ds)
{
- devlink_resources_unregister(ds->devlink, NULL);
+ devlink_resources_unregister(ds->devlink);
}
EXPORT_SYMBOL_GPL(dsa_devlink_resources_unregister);