summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJanne Grunau <j@jannau.net>2012-02-02 17:35:21 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-02-14 19:45:32 +0100
commitafa159538af61f1a65d48927f4e949fe514fb4fc (patch)
tree3d51aca319261e9a19d777670ff06f933ac6c50c /drivers
parent[media] omap3isp: Fix crash caused by subdevs now having a pointer to devnodes (diff)
downloadlinux-afa159538af61f1a65d48927f4e949fe514fb4fc.tar.xz
linux-afa159538af61f1a65d48927f4e949fe514fb4fc.zip
[media] hdpvr: fix race conditon during start of streaming
status has to be set to STREAMING before the streaming worker is queued. hdpvr_transmit_buffers() will exit immediately otherwise. Reported-by: Joerg Desch <vvd.joede@googlemail.com> CC: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/hdpvr/hdpvr-video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/video/hdpvr/hdpvr-video.c b/drivers/media/video/hdpvr/hdpvr-video.c
index 087f7c08cb85..41fd57b6ccfb 100644
--- a/drivers/media/video/hdpvr/hdpvr-video.c
+++ b/drivers/media/video/hdpvr/hdpvr-video.c
@@ -283,12 +283,13 @@ static int hdpvr_start_streaming(struct hdpvr_device *dev)
hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00);
+ dev->status = STATUS_STREAMING;
+
INIT_WORK(&dev->worker, hdpvr_transmit_buffers);
queue_work(dev->workqueue, &dev->worker);
v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev,
"streaming started\n");
- dev->status = STATUS_STREAMING;
return 0;
}