Moikka!
On 14.02.2014 16:57, Hans Verkuil wrote:
On 02/11/2014 03:04 AM, Antti Palosaari wrote:
+static int rtl2832_sdr_stop_streaming(struct vb2_queue *vq)
+{
+ struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq);
+ dev_dbg(&s->udev->dev, "%s:\n", __func__);
+
+ if (mutex_lock_interruptible(&s->v4l2_lock))
+ return -ERESTARTSYS;
Just use mutex_lock here. The return code of stop_streaming is never checked
so stop_streaming must always succeed. Personally I am in favor of changing
the return code of stop_streaming to void since it simply doesn't make sense
to return an error here.
I decided not to change that at this time. My brains are so sleepy just
now that I cannot think about it on the level I would like. IIRC did
similar change to DVB USB year or two back as it happens some signal was
coming from userspace (crtl+C) and it breaks out too early without
putting hw to sleep. So I think that there should not be interruptible
mutex in any patch where is I/O done. But that is similarly to other
drivers too, feel free to fix all those if you wish :)
regards
Antti
--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html