Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

sonypi: BKL pushdown



Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 0410e689
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@
#include <linux/err.h>
#include <linux/kfifo.h>
#include <linux/platform_device.h>
#include <linux/smp_lock.h>

#include <asm/uaccess.h>
#include <asm/io.h>
@@ -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;
}