Skip to content

Commit

Permalink
sony-laptop: BKL pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jul 2, 2008
1 parent 9edca64 commit 0410e68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/misc/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 0410e68

Please sign in to comment.