summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-alsa-pcm.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-11-19 21:04:31 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-01 23:10:16 +0100
commit78b055be2710b63cb196fc37669f3b662fecc9e4 (patch)
tree39e32dbfb6c853f811715caf1ac8d0a411a8fa83 /drivers/media/video/cx18/cx18-alsa-pcm.c
parent[media] radio-timb: convert to unlocked_ioctl (diff)
downloadlinux-78b055be2710b63cb196fc37669f3b662fecc9e4.tar.xz
linux-78b055be2710b63cb196fc37669f3b662fecc9e4.zip
[media] cx18: convert to unlocked_ioctl
Also added locking around snd_cx18_pcm_ioctl as a precaution as requested by Andy Walls. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-alsa-pcm.c')
-rw-r--r--drivers/media/video/cx18/cx18-alsa-pcm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-alsa-pcm.c b/drivers/media/video/cx18/cx18-alsa-pcm.c
index 8f55692db36d..82d195be9197 100644
--- a/drivers/media/video/cx18/cx18-alsa-pcm.c
+++ b/drivers/media/video/cx18/cx18-alsa-pcm.c
@@ -218,7 +218,13 @@ static int snd_cx18_pcm_capture_close(struct snd_pcm_substream *substream)
static int snd_cx18_pcm_ioctl(struct snd_pcm_substream *substream,
unsigned int cmd, void *arg)
{
- return snd_pcm_lib_ioctl(substream, cmd, arg);
+ struct snd_cx18_card *cxsc = snd_pcm_substream_chip(substream);
+ int ret;
+
+ snd_cx18_lock(cxsc);
+ ret = snd_pcm_lib_ioctl(substream, cmd, arg);
+ snd_cx18_unlock(cxsc);
+ return ret;
}