staging: most: block module removal while having active configfs items
authorChristian Gromm <christian.gromm@microchip.com>
Fri, 8 Nov 2019 16:21:08 +0000 (17:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Nov 2019 15:41:00 +0000 (16:41 +0100)
commit08283d30744434d8f30d386622372e8f5b03bcf2
treec34f2411b0de27f49975720fd9e066ec08c6ee13
parent4845b3c8c8d221441605a1eff8aab7f1622dce93
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>
drivers/staging/most/cdev/cdev.c
drivers/staging/most/configfs.c
drivers/staging/most/core.h
drivers/staging/most/net/net.c
drivers/staging/most/sound/sound.c
drivers/staging/most/video/video.c