summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMaxim Levitsky <maximlevitsky@gmail.com>2007-09-27 20:34:15 -0300
committerMaxim Levitsky <maximlevitsky@gmail.com>2007-09-27 20:34:15 -0300
commit87dd053390a33acfb59e66cea25e530f04d8caa1 (patch)
tree9f64562c1f5e8b92c314144a925f13ebb2874a55 /linux/drivers
parent82d4b0451edeb07b125ed306abb92247c8967178 (diff)
downloadmediapointer-dvb-s2-87dd053390a33acfb59e66cea25e530f04d8caa1.tar.gz
mediapointer-dvb-s2-87dd053390a33acfb59e66cea25e530f04d8caa1.tar.bz2
V4L: Fix a "scheduling while atomic" bug in saa7134
set_tvnorm can sleep in saa7134_i2c_xfer (it will be called through tuner code) but code calls it under spinlock. Fix that Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index adced54a0..2231d31a1 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -1841,7 +1841,11 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
if (res_check(fh, RESOURCE_OVERLAY)) {
spin_lock_irqsave(&dev->slock,flags);
stop_preview(dev,fh);
+ spin_unlock_irqrestore(&dev->slock, flags);
+
set_tvnorm(dev,&tvnorms[i]);
+
+ spin_lock_irqsave(&dev->slock, flags);
start_preview(dev,fh);
spin_unlock_irqrestore(&dev->slock,flags);
} else