summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>2021-11-28 16:24:59 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-12-07 13:29:55 +0300
commit468613a67bcbc9ef63fe13ec7214c34e5c7b96ba (patch)
tree27696adcfe734b2dbc4012d62c92d75a29e6b898 /drivers/media
parente37e82188bc9114a9e285d003569dcad5f6d5612 (diff)
downloadlinux-468613a67bcbc9ef63fe13ec7214c34e5c7b96ba.tar.xz
media: rcar-vin: Do not hold the group lock when unregistering notifier
There is no need to hold the group lock when unregistering the notifier, but doing so triggers a warning about a possible cyclic lock dependency. The lock warning cover the case where a subdevice is about to be bound to the notifier at the same time as it's unregistered. The locking for this scenario is handled in the v4l2-async framework so it's safe to remove the lock in the driver. This match the locking logic in the driver for when the notifier in question is registered. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/rcar-vin/rcar-core.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
index 6d4cffdbf47a..0186ae235113 100644
--- a/drivers/media/platform/rcar-vin/rcar-core.c
+++ b/drivers/media/platform/rcar-vin/rcar-core.c
@@ -349,12 +349,10 @@ out:
static void rvin_group_notifier_cleanup(struct rvin_dev *vin)
{
- mutex_lock(&vin->group->lock);
if (&vin->v4l2_dev == vin->group->notifier.v4l2_dev) {
v4l2_async_nf_unregister(&vin->group->notifier);
v4l2_async_nf_cleanup(&vin->group->notifier);
}
- mutex_unlock(&vin->group->lock);
}
static int rvin_group_notifier_init(struct rvin_dev *vin, unsigned int port,