diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-19 06:17:44 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-20 17:20:14 -0200 |
commit | f2a2e4910502e866833732f31ee697d15b3e56fd (patch) | |
tree | 0679969d675d9e785c6c92a3625ce8df759e0cc3 /drivers/media/video/em28xx/em28xx-video.c | |
parent | c4a98793a63c423c9e1af51822325969e23c16d4 (diff) |
V4L/DVB (9647): em28xx: void having two concurrent control URB's
Now that we have a polling task for IR, there's a race condition, since
IR can be polling while other operations are being doing. Also, we are
now sharing the same urb_buf for both read and write control urb
operations. So, we need a mutex.
Thanks to Davin Heitmueller <devin.heitmueller@gmail.com> for warning me.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index bca5955339b..c32fc7d24a4 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -1936,6 +1936,7 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, dev->udev = udev; mutex_init(&dev->lock); + mutex_init(&dev->ctrl_urb_lock); spin_lock_init(&dev->slock); init_waitqueue_head(&dev->open); init_waitqueue_head(&dev->wait_frame); |