diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 21:16:46 +0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-03 01:06:25 +0400 |
commit | f8f2c79d594463427f7114cedb1555110d547d89 (patch) | |
tree | b9e7a5bc2e3da4f5449bf5b862bb451e67372c6b /drivers/char/sonypi.c | |
parent | 0410e689b19b6ca010a6a44abfa820968ae15733 (diff) | |
download | linux-f8f2c79d594463427f7114cedb1555110d547d89.tar.xz |
sonypi: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/char/sonypi.c')
-rw-r--r-- | drivers/char/sonypi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 58533de59027..85e0eb76eeab 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c @@ -49,6 +49,7 @@ #include <linux/err.h> #include <linux/kfifo.h> #include <linux/platform_device.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <asm/io.h> @@ -906,12 +907,14 @@ static int sonypi_misc_release(struct inode *inode, struct file *file) static int sonypi_misc_open(struct inode *inode, struct file *file) { + lock_kernel(); mutex_lock(&sonypi_device.lock); /* Flush input queue on first open */ if (!sonypi_device.open_count) kfifo_reset(sonypi_device.fifo); sonypi_device.open_count++; mutex_unlock(&sonypi_device.lock); + unlock_kernel(); return 0; } |