Skip to content

Commit

Permalink
V4L/DVB (6269): V4L: Fix a "scheduling while atomic" bug in saa7134
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxim Levitsky authored and Mauro Carvalho Chehab committed Oct 10, 2007
1 parent 9900132 commit b4aeb8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/video/saa7134/saa7134-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,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
Expand Down

0 comments on commit b4aeb8b

Please sign in to comment.