[lkml]   [2010]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] staging: easycap: fix build failure
This fixes:

drivers/staging/easycap/easycap_main.c:4251:3: error: implicit declaration of function 'lock_kernel'
drivers/staging/easycap/easycap_main.c:4254:3: error: implicit declaration of function 'unlock_kernel'

We need to include smp_lock.h in order to have BKL primitives (the driver
already correctly depends on BKL).

Signed-off-by: Jiri Kosina <>

Now, I really believe that this driver is completely hopeless and the only
option is complete from-scratch rewrite. I have been looking into it for
approximately ~30 seconds (solely to fix this build failure), and I really
don't know what to say.

- what kind of super-crazy indentation does it have? Seems like it lost
first level of indentation somewhere. Completely unreadable.
- understanding what field2frame() does is probably completely hopeless
- copying textual representation of errno into some buffer (just grep of
errbuf) is crazy. Fortunately, the strings are copied there and never
used ... :P
- all the SAY(), JOT() macros ... what's the point?
- easysnd_testtone() seems to implement it's own kind of
endianity-sensitive memcpy(). Why does the for(...) cycle depend on
PAGE_SIZE? How much memory will it corrupt on architectures with
larger page size than what the author had in mind?

... and then I stopped reading.

drivers/staging/easycap/easycap.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/easycap/easycap.h b/drivers/staging/easycap/easycap.h
index 25961c2..caa9298 100644
--- a/drivers/staging/easycap/easycap.h
+++ b/drivers/staging/easycap/easycap.h
@@ -88,6 +88,7 @@
#include <linux/fs.h>
#include <linux/delay.h>
#include <linux/types.h>
+#include <linux/smp_lock.h>


 \ /
  Last update: 2010-11-29 18:25    [W:0.024 / U:12.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site