From 87dd053390a33acfb59e66cea25e530f04d8caa1 Mon Sep 17 00:00:00 2001 From: Maxim Levitsky Date: Thu, 27 Sep 2007 20:34:15 -0300 Subject: 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 Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/saa7134/saa7134-video.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux/drivers') 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 -- cgit v1.2.3