Hi Andy,

Andy Walls wrote:
+int v4l2_event_pending(struct v4l2_fh *fh)
+{
+       struct v4l2_events *events =&fh->events;
+       unsigned long flags;
+       int ret;
+
+       spin_lock_irqsave(&events->lock, flags);
+       ret = !list_empty(&events->available);
+       spin_unlock_irqrestore(&events->lock, flags);
+
+       return ret;
+}
+EXPORT_SYMBOL_GPL(v4l2_event_pending);

Hi Sakari,

Disabling and restoring local interrupts to check if any events are
pending seems excessive.

Since you added an atomic_t with the number of events available in patch
5/7, why don't you just check that atomic_t here?

Thanks for the comments!

I'll put the fix to patch 5.

--
Sakari Ailus
sakari.ai...@maxwell.research.nokia.com
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to