From: Sakari Ailus Date: Mon, 3 May 2010 15:42:46 +0000 (-0300) Subject: V4L/DVB: V4L: Events: Replace bad WARN_ON() with assert_spin_locked() X-Git-Tag: Ubuntu-goldfish-3.4.0-4.27~7348^2~90 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f3cd385a9c95e1ea90e886448ab1e83ee2fc7e51;p=mirror_ubuntu-zesty-kernel.git 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: Sakari Ailus Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/v4l2-event.c b/drivers/media/video/v4l2-event.c index 170e40f56cf7..91bb1c823992 100644 --- a/drivers/media/video/v4l2-event.c +++ b/drivers/media/video/v4l2-event.c @@ -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)