aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-10-09 14:53:58 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:17:50 -0400
commit39a96b4cf592e79aefd1b4f2b136c20ec7bf10a7 (patch)
tree010b6910c34bbe9bb2b513ccde537f4bdc152dd0 /drivers/media/video/em28xx/em28xx.h
parent643800d5c806cf46b0cd184b595a14cce83224e4 (diff)
[media] em28xx-audio: fix some locking issues
Those locking issues affect tvtime, causing a kernel oops/panic, due to a race condition. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx.h')
-rw-r--r--drivers/media/video/em28xx/em28xx.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h
index 1c61a6b65d28..adb20eb6d902 100644
--- a/drivers/media/video/em28xx/em28xx.h
+++ b/drivers/media/video/em28xx/em28xx.h
@@ -25,12 +25,13 @@
25#ifndef _EM28XX_H 25#ifndef _EM28XX_H
26#define _EM28XX_H 26#define _EM28XX_H
27 27
28#include <linux/workqueue.h>
29#include <linux/i2c.h>
30#include <linux/mutex.h>
28#include <linux/videodev2.h> 31#include <linux/videodev2.h>
32
29#include <media/videobuf-vmalloc.h> 33#include <media/videobuf-vmalloc.h>
30#include <media/v4l2-device.h> 34#include <media/v4l2-device.h>
31
32#include <linux/i2c.h>
33#include <linux/mutex.h>
34#include <media/ir-kbd-i2c.h> 35#include <media/ir-kbd-i2c.h>
35#include <media/ir-core.h> 36#include <media/ir-core.h>
36#if defined(CONFIG_VIDEO_EM28XX_DVB) || defined(CONFIG_VIDEO_EM28XX_DVB_MODULE) 37#if defined(CONFIG_VIDEO_EM28XX_DVB) || defined(CONFIG_VIDEO_EM28XX_DVB_MODULE)
@@ -184,11 +185,6 @@ enum em28xx_mode {
184 EM28XX_DIGITAL_MODE, 185 EM28XX_DIGITAL_MODE,
185}; 186};
186 187
187enum em28xx_stream_state {
188 STREAM_OFF,
189 STREAM_INTERRUPT,
190 STREAM_ON,
191};
192 188
193struct em28xx; 189struct em28xx;
194 190
@@ -463,7 +459,6 @@ struct em28xx_audio {
463 struct snd_card *sndcard; 459 struct snd_card *sndcard;
464 460
465 int users; 461 int users;
466 enum em28xx_stream_state capture_stream;
467 spinlock_t slock; 462 spinlock_t slock;
468}; 463};
469 464
@@ -505,6 +500,10 @@ struct em28xx {
505 unsigned int has_audio_class:1; 500 unsigned int has_audio_class:1;
506 unsigned int has_alsa_audio:1; 501 unsigned int has_alsa_audio:1;
507 502
503 /* Controls audio streaming */
504 struct work_struct wq_trigger; /* Trigger to start/stop audio for alsa module */
505 atomic_t stream_started; /* stream should be running if true */
506
508 struct em28xx_fmt *format; 507 struct em28xx_fmt *format;
509 508
510 struct em28xx_IR *ir; 509 struct em28xx_IR *ir;