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

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

genrtc: BKL pushdown



Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 78abb6ac
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -51,6 +51,7 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/poll.h>
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <linux/proc_fs.h>
#include <linux/smp_lock.h>
#include <linux/workqueue.h>
#include <linux/workqueue.h>


#include <asm/uaccess.h>
#include <asm/uaccess.h>
@@ -338,12 +339,16 @@ static int gen_rtc_ioctl(struct inode *inode, struct file *file,


static int gen_rtc_open(struct inode *inode, struct file *file)
static int gen_rtc_open(struct inode *inode, struct file *file)
{
{
	if (gen_rtc_status & RTC_IS_OPEN)
	lock_kernel();
	if (gen_rtc_status & RTC_IS_OPEN) {
		unlock_kernel();
		return -EBUSY;
		return -EBUSY;
	}


	gen_rtc_status |= RTC_IS_OPEN;
	gen_rtc_status |= RTC_IS_OPEN;
	gen_rtc_irq_data = 0;
	gen_rtc_irq_data = 0;
	irq_active = 0;
	irq_active = 0;
	unlock_kernel();


	return 0;
	return 0;
}
}