diff options
author | Andy Walls <awalls@radix.net> | 2010-01-30 20:27:29 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 21:10:50 +0300 |
commit | 83695009a439b86c520f9001c80cc5a042c2d940 (patch) | |
tree | 8519852135e4f1980114c5527092f070d0223bd6 /drivers/media/video/cx18/cx18-alsa.h | |
parent | 10e43d90da572f088f15cadfb5cc83cd762041c3 (diff) | |
download | linux-83695009a439b86c520f9001c80cc5a042c2d940.tar.xz |
V4L/DVB: cx18: Rename snd_cx18_mixer_lock to snd_cx18_lock and increase visibility
Rename snd_cx18_mixer_lock() to snd_cx18_lock() in anticpation of using it
in the cx18-alsa-pcm.c file routines.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-alsa.h')
-rw-r--r-- | drivers/media/video/cx18/cx18-alsa.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-alsa.h b/drivers/media/video/cx18/cx18-alsa.h index 2546779b7313..88a1cde7540b 100644 --- a/drivers/media/video/cx18/cx18-alsa.h +++ b/drivers/media/video/cx18/cx18-alsa.h @@ -32,6 +32,22 @@ struct snd_cx18_card { extern int cx18_alsa_debug; +/* + * File operations that manipulate the encoder or video or audio subdevices + * need to be serialized. Use the same lock we use for v4l2 file ops. + */ +static inline void snd_cx18_lock(struct snd_cx18_card *cxsc) +{ + struct cx18 *cx = to_cx18(cxsc->v4l2_dev); + mutex_lock(&cx->serialize_lock); +} + +static inline void snd_cx18_unlock(struct snd_cx18_card *cxsc) +{ + struct cx18 *cx = to_cx18(cxsc->v4l2_dev); + mutex_unlock(&cx->serialize_lock); +} + #define CX18_ALSA_DBGFLG_WARN (1 << 0) #define CX18_ALSA_DBGFLG_WARN (1 << 0) #define CX18_ALSA_DBGFLG_INFO (1 << 1) |