Skip to content

Commit 468613a

Browse files
Niklas Söderlundmchehab
authored andcommitted
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>
1 parent e37e821 commit 468613a

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

‎drivers/media/platform/rcar-vin/rcar-core.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,10 @@ static int rvin_group_parse_of(struct rvin_dev *vin, unsigned int port,
349349

350350
static void rvin_group_notifier_cleanup(struct rvin_dev *vin)
351351
{
352-
mutex_lock(&vin->group->lock);
353352
if (&vin->v4l2_dev == vin->group->notifier.v4l2_dev) {
354353
v4l2_async_nf_unregister(&vin->group->notifier);
355354
v4l2_async_nf_cleanup(&vin->group->notifier);
356355
}
357-
mutex_unlock(&vin->group->lock);
358356
}
359357

360358
static int rvin_group_notifier_init(struct rvin_dev *vin, unsigned int port,

0 commit comments

Comments
 (0)