提交 8bc3efcf 编写于 作者: R Ronald S. Bultje 提交者: Linus Torvalds

[PATCH] prevent dmesg warning in zr36067 driver

Fix the warning "Debug: sleeping function called from invalid context at
include/asm/semaphore.h:102" that the zr36067 driver emits every time an
application using JPEG capture starts up (e.g.  mjpegtools' lavrec).

The warning is harmless, but clogs up the dmesg output.  This was logged as
bugzilla #5403.  (Thanks to Christian Casteyde for helping me in fixing
this long-standing annoyance.)
Signed-off-by: NRonald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 597a107b
......@@ -996,8 +996,6 @@ zoran_jpg_queue_frame (struct file *file,
return -EINVAL;
}
spin_lock_irqsave(&zr->spinlock, flags);
if (fh->jpg_buffers.active == ZORAN_FREE) {
if (zr->jpg_buffers.active == ZORAN_FREE) {
zr->jpg_buffers = fh->jpg_buffers;
......@@ -1016,6 +1014,8 @@ zoran_jpg_queue_frame (struct file *file,
zr36057_enable_jpg(zr, mode);
}
spin_lock_irqsave(&zr->spinlock, flags);
if (!res) {
switch (zr->jpg_buffers.buffer[num].state) {
case BUZ_STATE_DONE:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册