Skip to contentSkip to conversation

mtd: remove duplicate assignment of chip->state

PATCH Tadashi Abe 2 participants 2 messages May 19, 2011 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

This is a trivial patch which removes unnecessary assignment of chip->state in put_chip(). It's duplicated.

---
 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(-)
drivers/mtd/chips/cfi_cmdset_0001.c +0 -1
index 09cb7c8..308709a 100644
@@ -997,7 +997,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
drivers/mtd/chips/cfi_cmdset_0002.c +0 -1
index 0b49266..6d55281 100644
@@ -762,7 +762,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;
drivers/mtd/lpddr/lpddr_cmds.c +0 -1
index 1267992..c8f79c7 100644
@@ -383,7 +383,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),
Signature · 1 line
1.7.4.4