mtd: remove duplicate assignment of chip->state

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue May 24 21:59:07 EDT 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=5c8d2607756a63ddf5b2f2dd368851b8febe4e72
Commit:     5c8d2607756a63ddf5b2f2dd368851b8febe4e72
Parent:     100f2341e305f98de3aa12fb472771ab029cbda7
Author:     Tadashi Abe <tabe at mvista.com>
AuthorDate: Thu May 19 16:17:50 2011 +0900
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Wed May 25 02:11:13 2011 +0100

    mtd: remove duplicate assignment of chip->state
    
    This is a trivial patch which removes unnecessary assignment of chip->state
    in put_chip(). It's duplicated.
    
    Signed-off-by: Tadashi Abe <tabe at mvista.com>
    Acked-by: Joakim Tjernlund <joakim.tjernlund at transmode.se>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/chips/cfi_cmdset_0001.c |    1 -
 drivers/mtd/chips/cfi_cmdset_0002.c |    1 -
 drivers/mtd/lpddr/lpddr_cmds.c      |    1 -
 3 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 121be02..e1e122f 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -994,7 +994,6 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad
 
 	switch(chip->oldstate) {
 	case FL_ERASING:
-		chip->state = chip->oldstate;
 		/* What if one interleaved chip has finished and the
 		   other hasn't? The old code would leave the finished
 		   one in READY mode. That's bad, and caused -EROFS
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 9a99a5b..23175ed 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -761,7 +761,6 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad
 
 	switch(chip->oldstate) {
 	case FL_ERASING:
-		chip->state = chip->oldstate;
 		map_write(map, cfi->sector_erase_cmd, chip->in_progress_block_addr);
 		chip->oldstate = FL_READY;
 		chip->state = FL_ERASING;
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
index 16dcd1c..65655dd 100644
--- a/drivers/mtd/lpddr/lpddr_cmds.c
+++ b/drivers/mtd/lpddr/lpddr_cmds.c
@@ -378,7 +378,6 @@ static void put_chip(struct map_info *map, struct flchip *chip)
 
 	switch (chip->oldstate) {
 	case FL_ERASING:
-		chip->state = chip->oldstate;
 		map_write(map, CMD(LPDDR_RESUME),
 				map->pfow_base + PFOW_COMMAND_CODE);
 		map_write(map, CMD(LPDDR_START_EXECUTION),



More information about the linux-mtd-cvs mailing list