comedi: Removal of <linux/smp_lock.h>
authorIan Abbott <abbotti@mev.co.uk>
Fri, 13 May 2011 13:55:19 +0000 (14:55 +0100)
committerIan Abbott <abbotti@mev.co.uk>
Fri, 13 May 2011 13:55:19 +0000 (14:55 +0100)
The <linux/smp_lock.h> header (used for the Big Kernel Lock) is removed
in kernel 2.6.39.  It was included by:

  comedi/comedi_compat32.c
  comedi/drivers/usbdux.c
  comedi/drivers/usbduxfast.c

The usbdux and usbduxfast drivers shouldn't need to include the header
as they don't grab the BKL, so remove the #include line for these
drivers.

The comedi_compat32 code only uses it when calling the ioctl file
operation, and that can only happen for kernels up to 2.6.35 (and even
then it wouldn't be called if the unlocked_ioctl file operation is
available!). Ifdef out the #include line.  Also include
<linux/version.h> explicitly to avoid compiler errors for 2.6.39 kernel.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
comedi/comedi_compat32.c
comedi/drivers/usbdux.c
comedi/drivers/usbduxfast.c

index 6156f77d904d8434f28b5ff9c21b37d87789db63..a579ea7b0e3b65bbd1160318b043f5570b2be261 100644 (file)
 */
 
 #define __NO_VERSION__
+#include <linux/version.h>
 #include <linux/comedi.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)
 #include <linux/smp_lock.h>
+#endif
 #include <asm/uaccess.h>
 
 #include "comedi_compat32.h"
index 8d99c47e7a8f37f7fc03261de1cecc1d5de9c016..032877a69c1175ad23c31a37afd173a36c8b1c1c 100644 (file)
@@ -90,7 +90,6 @@ sampling rate. If you sample two channels you get 4kHz and so on.
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/usb.h>
-#include <linux/smp_lock.h>
 #include <linux/fcntl.h>
 #include <linux/compiler.h>
 #include <linux/firmware.h>
index b35e654ed6804823b750497a3a5107267c869340..a8793501d52605c51c81885cd58a7d18d87a7abc 100644 (file)
@@ -56,7 +56,6 @@ Status: stable
 #include <linux/slab.h>
 #include <linux/input.h>
 #include <linux/usb.h>
-#include <linux/smp_lock.h>
 #include <linux/fcntl.h>
 #include <linux/compiler.h>
 #include "comedi_fc.h"