aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-11-07 04:00:22 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:53:47 -0500
commit8bc3efcfbf6521ec7bf3e5d969b31745fbd986f8 (patch)
tree3558a51005787a2c56d56c95019dd889bd06fbbb /drivers/media/video
parent597a107b1d5587dc230dbbe3faeca242daed494e (diff)
[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: Ronald S. Bultje <rbultje@ronald.bitfreak.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/zoran_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c
index 53adeb70f2ca..07bde9acd672 100644
--- a/drivers/media/video/zoran_driver.c
+++ b/drivers/media/video/zoran_driver.c
@@ -996,8 +996,6 @@ zoran_jpg_queue_frame (struct file *file,
996 return -EINVAL; 996 return -EINVAL;
997 } 997 }
998 998
999 spin_lock_irqsave(&zr->spinlock, flags);
1000
1001 if (fh->jpg_buffers.active == ZORAN_FREE) { 999 if (fh->jpg_buffers.active == ZORAN_FREE) {
1002 if (zr->jpg_buffers.active == ZORAN_FREE) { 1000 if (zr->jpg_buffers.active == ZORAN_FREE) {
1003 zr->jpg_buffers = fh->jpg_buffers; 1001 zr->jpg_buffers = fh->jpg_buffers;
@@ -1016,6 +1014,8 @@ zoran_jpg_queue_frame (struct file *file,
1016 zr36057_enable_jpg(zr, mode); 1014 zr36057_enable_jpg(zr, mode);
1017 } 1015 }
1018 1016
1017 spin_lock_irqsave(&zr->spinlock, flags);
1018
1019 if (!res) { 1019 if (!res) {
1020 switch (zr->jpg_buffers.buffer[num].state) { 1020 switch (zr->jpg_buffers.buffer[num].state) {
1021 case BUZ_STATE_DONE: 1021 case BUZ_STATE_DONE: