Commit f3cd385a authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

V4L/DVB: V4L: Events: Replace bad WARN_ON() with assert_spin_locked()

spin_is_locked() always returns zero when spinlock debugging is
disabled on a single CPU machine. Replace WARN_ON() with
assert_spin_locked().

Thanks to Laurent Pinchart for spotting this!
Signed-off-by: default avatarSakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 5a11b6fe
......@@ -152,7 +152,7 @@ static struct v4l2_subscribed_event *v4l2_event_subscribed(
struct v4l2_events *events = fh->events;
struct v4l2_subscribed_event *sev;
WARN_ON(!spin_is_locked(&fh->vdev->fh_lock));
assert_spin_locked(&fh->vdev->fh_lock);
list_for_each_entry(sev, &events->subscribed, list) {
if (sev->type == type)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment