linux-mips
[Top] [All Lists]

[PATCH] [MIPS] DS1286: kill BKL

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH] [MIPS] DS1286: kill BKL
From: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Date: Mon, 27 Oct 2008 13:29:08 +0200
Cc: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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@movial.fi>
---
 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


<Prev in Thread] Current Thread [Next in Thread>