[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1011291813060.981@pobox.suse.cz>
Date: Mon, 29 Nov 2010 18:22:46 +0100 (CET)
From: Jiri Kosina <jkosina@...e.cz>
To: "R.M. Thomas" <rmthomas@...olus.org>,
Greg Kroah-Hartman <gregkh@...e.de>
Cc: Michal Marek <mmarek@...e.cz>, linux-kernel@...r.kernel.org,
devel@...verdev.osuosl.org
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 <jkosina@...e.cz>
---
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
effort
- 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>
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if defined(EASYCAP_IS_VIDEODEV_CLIENT)
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists