mtd: nand: remove doubled chip deselection on (un)lock
Chip deselection is already done in nand_release_device. So only duplicate code. Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
committed by
David Woodhouse
parent
ac497c1602
commit
c2aad6d658
@@ -976,9 +976,6 @@ int nand_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
|
|||||||
ret = __nand_unlock(mtd, ofs, len, 0);
|
ret = __nand_unlock(mtd, ofs, len, 0);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
/* de-select the NAND device */
|
|
||||||
chip->select_chip(mtd, -1);
|
|
||||||
|
|
||||||
nand_release_device(mtd);
|
nand_release_device(mtd);
|
||||||
|
|
||||||
return ret;
|
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);
|
ret = __nand_unlock(mtd, ofs, len, 0x1);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
/* de-select the NAND device */
|
|
||||||
chip->select_chip(mtd, -1);
|
|
||||||
|
|
||||||
nand_release_device(mtd);
|
nand_release_device(mtd);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user