Patchwork nand: Remove doubled chip deselection on (un)lock

login
register
mail settings
Submitter Jiri Pinkava
Date April 13, 2011, 10:26 a.m.
Message ID <1302690408-17498-1-git-send-email-jiri.pinkava@vscht.cz>
Download mbox | patch
Permalink /patch/90982/
State New
Headers show

Comments

Jiri Pinkava - April 13, 2011, 10:26 a.m.
Chip deselection is already done in nand_release_device. So only
duplicate code.

Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
 drivers/mtd/nand/nand_base.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
Artem Bityutskiy - April 14, 2011, 12:20 p.m.
On Wed, 2011-04-13 at 12:26 +0200, Jiri Pinkava wrote:
> Chip deselection is already done in nand_release_device. So only
> duplicate code.
> 
> Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>

Pushed to l2-mtd-2.6.git, thanks.

Patch

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;