Commit f8f2c79d authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Corbet

sonypi: BKL pushdown

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 0410e689
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include <linux/err.h> #include <linux/err.h>
#include <linux/kfifo.h> #include <linux/kfifo.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -906,12 +907,14 @@ static int sonypi_misc_release(struct inode *inode, struct file *file) ...@@ -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) static int sonypi_misc_open(struct inode *inode, struct file *file)
{ {
lock_kernel();
mutex_lock(&sonypi_device.lock); mutex_lock(&sonypi_device.lock);
/* Flush input queue on first open */ /* Flush input queue on first open */
if (!sonypi_device.open_count) if (!sonypi_device.open_count)
kfifo_reset(sonypi_device.fifo); kfifo_reset(sonypi_device.fifo);
sonypi_device.open_count++; sonypi_device.open_count++;
mutex_unlock(&sonypi_device.lock); mutex_unlock(&sonypi_device.lock);
unlock_kernel();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment