hangcheck-timer: fix x86_32 bugs
[safe/jmp/linux-2.6] / drivers / char / tb0219.c
index b3ec9b1..cad4eb6 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/smp_lock.h>
 
 #include <asm/io.h>
 #include <asm/reboot.h>
@@ -38,7 +37,7 @@ MODULE_PARM_DESC(major, "Major device number");
 
 static void (*old_machine_restart)(char *command);
 static void __iomem *tb0219_base;
-static spinlock_t tb0219_lock;
+static DEFINE_SPINLOCK(tb0219_lock);
 
 #define tb0219_read(offset)            readw(tb0219_base + (offset))
 #define tb0219_write(offset, value)    writew((value), tb0219_base + (offset))
@@ -237,7 +236,6 @@ static int tanbac_tb0219_open(struct inode *inode, struct file *file)
 {
        unsigned int minor;
 
-       cycle_kernel_lock();
        minor = iminor(inode);
        switch (minor) {
        case 0:
@@ -306,8 +304,6 @@ static int __devinit tb0219_probe(struct platform_device *dev)
                return retval;
        }
 
-       spin_lock_init(&tb0219_lock);
-
        old_machine_restart = _machine_restart;
        _machine_restart = tb0219_restart;