#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>
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))
{
unsigned int minor;
- cycle_kernel_lock();
minor = iminor(inode);
switch (minor) {
case 0:
return retval;
}
- spin_lock_init(&tb0219_lock);
-
old_machine_restart = _machine_restart;
_machine_restart = tb0219_restart;