From: Arnd Bergmann Date: Tue, 20 May 2008 17:16:46 +0000 (+0200) Subject: sonypi: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~27 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f8f2c79d594463427f7114cedb1555110d547d89;p=linux-2.6-omap-h63xx.git sonypi: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 58533de5902..85e0eb76eea 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -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; }