Received: from mail.onstor.com ([66.201.51.107]) by onstor-exch02.onstor.net with Microsoft SMTPSVC(6.0.3790.3959);
	 Mon, 27 Oct 2008 04:31:04 -0700
Received: from ausesmta2-3.messageone.com ([64.20.241.45]) by mail.onstor.com with Microsoft SMTPSVC(6.0.3790.3959);
	 Mon, 27 Oct 2008 04:31:04 -0700
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])
	by ausesmta2-3.messageone.com (8.13.8/8.13.8) with ESMTP id m9RBV2Ln020024
	for <andy.sharp@onstor.com>; Mon, 27 Oct 2008 06:31:03 -0500
Received: from localhost.localdomain ([127.0.0.1]:57226 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP
	id S22493145AbYJ0L3o (ORCPT <rfc822;andy.sharp@onstor.com>);
	Mon, 27 Oct 2008 11:29:44 +0000
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 27 Oct 2008 11:29:27 +0000 (GMT)
Received: from smtp.movial.fi ([62.236.91.34]:36251 "EHLO smtp.movial.fi")
	by ftp.linux-mips.org with ESMTP id S22493166AbYJ0L3P (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Mon, 27 Oct 2008 11:29:15 +0000
Received: from localhost (mailscanner.hel.movial.fi [172.17.81.9])
	by smtp.movial.fi (Postfix) with ESMTP id 6F2EBC8103;
	Mon, 27 Oct 2008 13:29:09 +0200 (EET)
X-Virus-Scanned: Debian amavisd-new at movial.fi
Received: from smtp.movial.fi ([62.236.91.34])
	by localhost (mailscanner.hel.movial.fi [172.17.81.9]) (amavisd-new, port 10026)
	with ESMTP id czJRlxHuSGAW; Mon, 27 Oct 2008 13:29:09 +0200 (EET)
Received: from sd048.hel.movial.fi (sd048.hel.movial.fi [172.17.49.48])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.movial.fi (Postfix) with ESMTP id 53E03C80FD;
	Mon, 27 Oct 2008 13:29:09 +0200 (EET)
Received: by sd048.hel.movial.fi (Postfix, from userid 30120)
	id 09910108020; Mon, 27 Oct 2008 13:29:08 +0200 (EET)
From: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
To: linux-mips@linux-mips.org, ralf@linux-mips.org
Cc: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Subject: [PATCH] [MIPS] DS1286: kill BKL
Date: 	Mon, 27 Oct 2008 13:29:08 +0200
Message-Id: <1225106948-30550-1-git-send-email-dmitri.vorobiev@movial.fi>
X-Mailer: git-send-email 1.5.6.5
X-archive-position: 20985
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: dmitri.vorobiev@movial.fi
Precedence: bulk
X-list: 	linux-mips
X-MessageOne-Virus-Version: vendor=fsecure engine=4.65.7400:2.4.4,1.2.40,4.0.164 definitions=2008-10-27_02:2008-10-10,2008-10-27,2008-10-27 signatures=0
X-MessageOne-Virus-Scanned: Clean
X-MessageOne-Envelope-Sender: linux-mips-bounce@linux-mips.org
X-MessageOne-Spam-Details: rule=m773emszm_notspam policy=m773emszm score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0810130000 definitions=main-0810270035
X-MessageOne-Spam-Score: 0
X-MessageOne-Spam-Bar: 
Return-Path: linux-mips-bounce@linux-mips.org
X-OriginalArrivalTime: 27 Oct 2008 11:31:04.0148 (UTC) FILETIME=[7EF2A140:01C93827]

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


