From patchwork Wed Apr 13 10:26:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pinkava X-Patchwork-Id: 90982 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8FDC5B6F6E for ; Wed, 13 Apr 2011 20:30:23 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1Q9xIc-0006N0-4h; Wed, 13 Apr 2011 10:27:50 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Q9xIa-00012s-Fd; Wed, 13 Apr 2011 10:27:48 +0000 Received: from ns.vscht.cz ([2001:718:3:15::5]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1Q9xIW-00012b-Nl for linux-mtd@lists.infradead.org; Wed, 13 Apr 2011 10:27:45 +0000 Received: from SMTPgw.vscht.cz (smtpgw.vscht.cz [147.33.10.26]) by ns.vscht.cz (8.13.8/8.13.8) with ESMTP id p3DART3P011014; Wed, 13 Apr 2011 12:27:29 +0200 Received: from S1117-pinky.jm.vscht.cz (147.33.239.194) by smtp.vscht.cz (147.33.10.110) with Microsoft SMTP Server id 8.2.255.0; Wed, 13 Apr 2011 12:27:29 +0200 From: Jiri Pinkava To: Subject: [PATCH] nand: Remove doubled chip deselection on (un)lock Date: Wed, 13 Apr 2011 12:26:48 +0200 Message-ID: <1302690408-17498-1-git-send-email-jiri.pinkava@vscht.cz> X-Mailer: git-send-email 1.7.4.4 MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110413_062745_246094_9F7D1A51 X-CRM114-Status: UNSURE ( 9.53 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: linux-mtd@lists.infradead.org, Jiri Pinkava , dwmw2@infradead.org, ben-linux@fluff.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Chip deselection is already done in nand_release_device. So only duplicate code. Signed-off-by: Jiri Pinkava --- drivers/mtd/nand/nand_base.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index c54a4cb..bc1c2e6 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -976,9 +976,6 @@ int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) ret = __nand_unlock(mtd, ofs, len, 0); out: - /* de-select the NAND device */ - chip->select_chip(mtd, -1); - nand_release_device(mtd); return ret; @@ -1046,9 +1043,6 @@ int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) ret = __nand_unlock(mtd, ofs, len, 0x1); out: - /* de-select the NAND device */ - chip->select_chip(mtd, -1); - nand_release_device(mtd); return ret;