Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4aeb8b8 authored by Maxim Levitsky's avatar Maxim Levitsky Committed by Mauro Carvalho Chehab
Browse files

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: default avatarMaxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 9900132f
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -1834,7 +1834,11 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
		if (res_check(fh, RESOURCE_OVERLAY)) {
		if (res_check(fh, RESOURCE_OVERLAY)) {
			spin_lock_irqsave(&dev->slock,flags);
			spin_lock_irqsave(&dev->slock,flags);
			stop_preview(dev,fh);
			stop_preview(dev,fh);
			spin_unlock_irqrestore(&dev->slock, flags);

			set_tvnorm(dev,&tvnorms[i]);
			set_tvnorm(dev,&tvnorms[i]);

			spin_lock_irqsave(&dev->slock, flags);
			start_preview(dev,fh);
			start_preview(dev,fh);
			spin_unlock_irqrestore(&dev->slock,flags);
			spin_unlock_irqrestore(&dev->slock,flags);
		} else
		} else