backfire: fix build failure for modern kernels

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

 



SPIN_LOCK_UNLOCKED doesn't work any more since v2.6.39-rc1~511^2~11
(locking: Remove deprecated lock initializers). DEFINE_SPINLOCK is
available since v2.6.14-rc1~223, so it should be ok to depend on that.
<linux/smp_lock.h> is gone since v2.6.39-rc1~467^2. Also <asm/system.h>
is gone for most architectures since v3.4-rc1~54^2.

The module builds fine for Debian's 2.6.32 and 3.6 kernels with this
change.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 src/backfire/backfire.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/src/backfire/backfire.c
+++ b/src/backfire/backfire.c
@@ -24,7 +24,6 @@
 #include <linux/sched.h>
 #include <linux/cpumask.h>
 #include <linux/time.h>
-#include <linux/smp_lock.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/miscdevice.h>
@@ -32,11 +31,10 @@
 #include <linux/spinlock.h>
 
 #include <asm/uaccess.h>
-#include <asm/system.h>
 
 #define BACKFIRE_MINOR MISC_DYNAMIC_MINOR
 
-static spinlock_t backfire_state_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(backfire_state_lock);
 static int backfire_open_cnt; /* #times opened */
 static int backfire_open_mode; /* special open modes */
 static struct timeval sendtime; /* when the most recent signal was sent */
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux