Browse Source

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@mvista.com>
Acked-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Tadashi Abe 14 years ago
parent
commit
5c8d260775

+ 0 - 1
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) {
 	switch(chip->oldstate) {
 	case FL_ERASING:
 	case FL_ERASING:
-		chip->state = chip->oldstate;
 		/* What if one interleaved chip has finished and the
 		/* What if one interleaved chip has finished and the
 		   other hasn't? The old code would leave the finished
 		   other hasn't? The old code would leave the finished
 		   one in READY mode. That's bad, and caused -EROFS
 		   one in READY mode. That's bad, and caused -EROFS

+ 0 - 1
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) {
 	switch(chip->oldstate) {
 	case FL_ERASING:
 	case FL_ERASING:
-		chip->state = chip->oldstate;
 		map_write(map, cfi->sector_erase_cmd, chip->in_progress_block_addr);
 		map_write(map, cfi->sector_erase_cmd, chip->in_progress_block_addr);
 		chip->oldstate = FL_READY;
 		chip->oldstate = FL_READY;
 		chip->state = FL_ERASING;
 		chip->state = FL_ERASING;

+ 0 - 1
drivers/mtd/lpddr/lpddr_cmds.c

@@ -378,7 +378,6 @@ static void put_chip(struct map_info *map, struct flchip *chip)
 
 
 	switch (chip->oldstate) {
 	switch (chip->oldstate) {
 	case FL_ERASING:
 	case FL_ERASING:
-		chip->state = chip->oldstate;
 		map_write(map, CMD(LPDDR_RESUME),
 		map_write(map, CMD(LPDDR_RESUME),
 				map->pfow_base + PFOW_COMMAND_CODE);
 				map->pfow_base + PFOW_COMMAND_CODE);
 		map_write(map, CMD(LPDDR_START_EXECUTION),
 		map_write(map, CMD(LPDDR_START_EXECUTION),