summaryrefslogtreecommitdiffstats
path: root/drivers/char/tb0219.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-10-10 16:07:03 +0200
committerThomas Gleixner <tglx@linutronix.de>2009-10-14 17:36:53 +0200
commitd2a7be0be1099c2554f4705d2c1c5081f8f96efc (patch)
tree92b7542288a26292c3e49b09121a9831ad7350a1 /drivers/char/tb0219.c
parent3a8183a2061ba54c4c2b3cd31c3add6fd717e853 (diff)
mips: Remove BKL from tb0219
cycle_kernel_lock() was added during the big BKL pushdown. It should ensure the serializiation against driver init code. tb0219_base is initialized before the character device is registered, but the spinlock is not initialized. Initialize the spinlock statically and remove cycle_kernel_lock(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <20091010153350.222654356@linutronix.de> Cc: Yoichi Yuasa <yuasa@linux-mips.org> Cc: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers/char/tb0219.c')
-rw-r--r--drivers/char/tb0219.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/char/tb0219.c b/drivers/char/tb0219.c
index b3ec9b10e29..cad4eb65f13 100644
--- a/drivers/char/tb0219.c
+++ b/drivers/char/tb0219.c
@@ -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;