diff options
author | Janne Grunau <j@jannau.net> | 2012-02-02 11:35:21 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-02-14 13:45:32 -0500 |
commit | afa159538af61f1a65d48927f4e949fe514fb4fc (patch) | |
tree | 3d51aca319261e9a19d777670ff06f933ac6c50c | |
parent | 63ae37ea5186a6890a8968611180dc61118f719d (diff) |
[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>
-rw-r--r-- | drivers/media/video/hdpvr/hdpvr-video.c | 3 |
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) | |||
283 | 283 | ||
284 | hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); | 284 | hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00); |
285 | 285 | ||
286 | dev->status = STATUS_STREAMING; | ||
287 | |||
286 | INIT_WORK(&dev->worker, hdpvr_transmit_buffers); | 288 | INIT_WORK(&dev->worker, hdpvr_transmit_buffers); |
287 | queue_work(dev->workqueue, &dev->worker); | 289 | queue_work(dev->workqueue, &dev->worker); |
288 | 290 | ||
289 | v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, | 291 | v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev, |
290 | "streaming started\n"); | 292 | "streaming started\n"); |
291 | dev->status = STATUS_STREAMING; | ||
292 | 293 | ||
293 | return 0; | 294 | return 0; |
294 | } | 295 | } |