[PATCH] [MIPS] DS1286: kill BKL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Using the Big Kernel Lock in the open() method of the DS1286
RTC driver is redundant, because the driver makes use of it's
own spinlock to guarantee serialized access. This patch kills
the redundant BKL calls.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@xxxxxxxxx>
---
 drivers/char/ds1286.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/char/ds1286.c b/drivers/char/ds1286.c
index 0a826d7..3e4c801 100644
--- a/drivers/char/ds1286.c
+++ b/drivers/char/ds1286.c
@@ -253,7 +253,6 @@ static int ds1286_ioctl(struct inode *inode, struct file *file,
 
 static int ds1286_open(struct inode *inode, struct file *file)
 {
-	lock_kernel();
 	spin_lock_irq(&ds1286_lock);
 
 	if (ds1286_status & RTC_IS_OPEN)
@@ -262,12 +261,10 @@ static int ds1286_open(struct inode *inode, struct file *file)
 	ds1286_status |= RTC_IS_OPEN;
 
 	spin_unlock_irq(&ds1286_lock);
-	unlock_kernel();
 	return 0;
 
 out_busy:
 	spin_lock_irq(&ds1286_lock);
-	unlock_kernel();
 	return -EBUSY;
 }
 
-- 
1.5.6.5



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux