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 <sakari.ailus@maxwell.research.nokia.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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)