summaryrefslogtreecommitdiff
path: root/drivers/char/sonypi.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 19:16:46 +0200
committerJonathan Corbet <corbet@lwn.net>2008-07-02 15:06:25 -0600
commitf8f2c79d594463427f7114cedb1555110d547d89 (patch)
treeb9e7a5bc2e3da4f5449bf5b862bb451e67372c6b /drivers/char/sonypi.c
parent0410e689b19b6ca010a6a44abfa820968ae15733 (diff)
sonypi: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/char/sonypi.c')
-rw-r--r--drivers/char/sonypi.c3
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;
}