Skip to content

Commit

Permalink
[PATCH] prevent dmesg warning in zr36067 driver
Browse files Browse the repository at this point in the history
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: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Ronald S. Bultje authored and Linus Torvalds committed Nov 7, 2005
1 parent 597a107 commit 8bc3efc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/zoran_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:
Expand Down

0 comments on commit 8bc3efc

Please sign in to comment.