diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2007-09-27 19:34:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 23:02:58 -0400 |
commit | b4aeb8b8232bd80764997bf38f574f63e118c259 (patch) | |
tree | f761305843c1e3450c93d82cea1342b964bb990d /drivers/media/video/saa7134/saa7134-video.c | |
parent | 9900132f3437e9373aa030cdb5bd2d5db15566e3 (diff) |
V4L/DVB (6269): 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 'drivers/media/video/saa7134/saa7134-video.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index cf40a9690a50..27c659cd0f30 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -1834,7 +1834,11 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
1834 | if (res_check(fh, RESOURCE_OVERLAY)) { | 1834 | if (res_check(fh, RESOURCE_OVERLAY)) { |
1835 | spin_lock_irqsave(&dev->slock,flags); | 1835 | spin_lock_irqsave(&dev->slock,flags); |
1836 | stop_preview(dev,fh); | 1836 | stop_preview(dev,fh); |
1837 | spin_unlock_irqrestore(&dev->slock, flags); | ||
1838 | |||
1837 | set_tvnorm(dev,&tvnorms[i]); | 1839 | set_tvnorm(dev,&tvnorms[i]); |
1840 | |||
1841 | spin_lock_irqsave(&dev->slock, flags); | ||
1838 | start_preview(dev,fh); | 1842 | start_preview(dev,fh); |
1839 | spin_unlock_irqrestore(&dev->slock,flags); | 1843 | spin_unlock_irqrestore(&dev->slock,flags); |
1840 | } else | 1844 | } else |