aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2010-11-19 15:04:31 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-01 17:10:16 -0500
commit78b055be2710b63cb196fc37669f3b662fecc9e4 (patch)
tree39e32dbfb6c853f811715caf1ac8d0a411a8fa83 /drivers/media/video/cx18
parent4f68775b7dfc6115169f689a42535486bf10977e (diff)
[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')
-rw-r--r--drivers/media/video/cx18/cx18-alsa-pcm.c8
-rw-r--r--drivers/media/video/cx18/cx18-streams.c2
2 files changed, 8 insertions, 2 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)
218static int snd_cx18_pcm_ioctl(struct snd_pcm_substream *substream, 218static int snd_cx18_pcm_ioctl(struct snd_pcm_substream *substream,
219 unsigned int cmd, void *arg) 219 unsigned int cmd, void *arg)
220{ 220{
221 return snd_pcm_lib_ioctl(substream, cmd, arg); 221 struct snd_cx18_card *cxsc = snd_pcm_substream_chip(substream);
222 int ret;
223
224 snd_cx18_lock(cxsc);
225 ret = snd_pcm_lib_ioctl(substream, cmd, arg);
226 snd_cx18_unlock(cxsc);
227 return ret;
222} 228}
223 229
224 230
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c
index 9045f1ece0eb..ab461e27d9dd 100644
--- a/drivers/media/video/cx18/cx18-streams.c
+++ b/drivers/media/video/cx18/cx18-streams.c
@@ -41,7 +41,7 @@ static struct v4l2_file_operations cx18_v4l2_enc_fops = {
41 .read = cx18_v4l2_read, 41 .read = cx18_v4l2_read,
42 .open = cx18_v4l2_open, 42 .open = cx18_v4l2_open,
43 /* FIXME change to video_ioctl2 if serialization lock can be removed */ 43 /* FIXME change to video_ioctl2 if serialization lock can be removed */
44 .ioctl = cx18_v4l2_ioctl, 44 .unlocked_ioctl = cx18_v4l2_ioctl,
45 .release = cx18_v4l2_close, 45 .release = cx18_v4l2_close,
46 .poll = cx18_v4l2_enc_poll, 46 .poll = cx18_v4l2_enc_poll,
47}; 47};