[PATCH] staging: easycap: fix build failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---

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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux