summaryrefslogtreecommitdiff
path: root/drivers/staging/most/net
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2019-11-08 19:21:08 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-11 18:41:00 +0300
commit08283d30744434d8f30d386622372e8f5b03bcf2 (patch)
treec34f2411b0de27f49975720fd9e066ec08c6ee13 /drivers/staging/most/net
parent4845b3c8c8d221441605a1eff8aab7f1622dce93 (diff)
downloadlinux-08283d30744434d8f30d386622372e8f5b03bcf2.tar.xz
staging: most: block module removal while having active configfs items
This patch avoids that core component modules are being unloaded while the related configfs interface has active items in its directories. It is needed to prevent the situation where the core module cannot be unloaded anymore, because the reference count 'used by' indicates that the module is still being used and the usage count cannot be decreased by calling rmdir, as the configfs directory has already been removed. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Link: https://lore.kernel.org/r/1573230068-27658-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/net')
-rw-r--r--drivers/staging/most/net/net.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c
index 26a31854c636..6cab1bb8956e 100644
--- a/drivers/staging/most/net/net.c
+++ b/drivers/staging/most/net/net.c
@@ -498,6 +498,7 @@ put_nd:
}
static struct core_component comp = {
+ .mod = THIS_MODULE,
.name = "net",
.probe_channel = comp_probe_channel,
.disconnect_channel = comp_disconnect_channel,