aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorAlessio Igor Bogani <abogani@texware.it>2009-03-26 08:58:25 -0400
committerLen Brown <len.brown@intel.com>2009-03-27 12:20:45 -0400
commit4ef4cbb3686f9265da87bc6e482162c96f415427 (patch)
treee3400d674fd2a3f37b86778e40390557ca3c6c40 /drivers/platform
parent3741834775de035bdf0cd1ce44862bb8c775a4fa (diff)
sony-laptop: Kill the BKL
Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/sony-laptop.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index fc0dd63e672..0f710317a94 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -46,7 +46,6 @@
46#include <linux/module.h> 46#include <linux/module.h>
47#include <linux/moduleparam.h> 47#include <linux/moduleparam.h>
48#include <linux/init.h> 48#include <linux/init.h>
49#include <linux/smp_lock.h>
50#include <linux/types.h> 49#include <linux/types.h>
51#include <linux/backlight.h> 50#include <linux/backlight.h>
52#include <linux/platform_device.h> 51#include <linux/platform_device.h>
@@ -2180,10 +2179,15 @@ static int sonypi_misc_release(struct inode *inode, struct file *file)
2180static int sonypi_misc_open(struct inode *inode, struct file *file) 2179static int sonypi_misc_open(struct inode *inode, struct file *file)
2181{ 2180{
2182 /* Flush input queue on first open */ 2181 /* Flush input queue on first open */
2183 lock_kernel(); 2182 unsigned long flags;
2183
2184 spin_lock_irqsave(sonypi_compat.fifo->lock, flags);
2185
2184 if (atomic_inc_return(&sonypi_compat.open_count) == 1) 2186 if (atomic_inc_return(&sonypi_compat.open_count) == 1)
2185 kfifo_reset(sonypi_compat.fifo); 2187 __kfifo_reset(sonypi_compat.fifo);
2186 unlock_kernel(); 2188
2189 spin_unlock_irqrestore(sonypi_compat.fifo->lock, flags);
2190
2187 return 0; 2191 return 0;
2188} 2192}
2189 2193