aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 19:16:45 +0200
committerJonathan Corbet <corbet@lwn.net>2008-07-02 15:06:25 -0600
commit0410e689b19b6ca010a6a44abfa820968ae15733 (patch)
treeab03276fbc49d1d27d4a7bd4e32e9c2a245fd1df
parent9edca64b724db74373f0c9ef7cb044a5f221a4a3 (diff)
downloadkernel_samsung_espresso10-0410e689b19b6ca010a6a44abfa820968ae15733.zip
kernel_samsung_espresso10-0410e689b19b6ca010a6a44abfa820968ae15733.tar.gz
kernel_samsung_espresso10-0410e689b19b6ca010a6a44abfa820968ae15733.tar.bz2
sony-laptop: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--drivers/misc/sony-laptop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 00e48e2..60775be 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -46,6 +46,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
+#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/backlight.h>
#include <linux/platform_device.h>
@@ -1927,8 +1928,10 @@ static int sonypi_misc_release(struct inode *inode, struct file *file)
static int sonypi_misc_open(struct inode *inode, struct file *file)
{
/* Flush input queue on first open */
+ lock_kernel();
if (atomic_inc_return(&sonypi_compat.open_count) == 1)
kfifo_reset(sonypi_compat.fifo);
+ unlock_kernel();
return 0;
}