aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips
diff options
context:
space:
mode:
authorTadashi Abe <tabe@mvista.com>2011-05-19 03:17:50 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-05-24 21:11:13 -0400
commit5c8d2607756a63ddf5b2f2dd368851b8febe4e72 (patch)
tree1e0327bc9bf9108bd93c92b68b0f4d1b3a114346 /drivers/mtd/chips
parent100f2341e305f98de3aa12fb472771ab029cbda7 (diff)
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>
Diffstat (limited to 'drivers/mtd/chips')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c1
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0002.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 121be022d1e..e1e122f2f92 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
994 994
995 switch(chip->oldstate) { 995 switch(chip->oldstate) {
996 case FL_ERASING: 996 case FL_ERASING:
997 chip->state = chip->oldstate;
998 /* What if one interleaved chip has finished and the 997 /* What if one interleaved chip has finished and the
999 other hasn't? The old code would leave the finished 998 other hasn't? The old code would leave the finished
1000 one in READY mode. That's bad, and caused -EROFS 999 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 9a99a5bd3ea..23175edd563 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
761 761
762 switch(chip->oldstate) { 762 switch(chip->oldstate) {
763 case FL_ERASING: 763 case FL_ERASING:
764 chip->state = chip->oldstate;
765 map_write(map, cfi->sector_erase_cmd, chip->in_progress_block_addr); 764 map_write(map, cfi->sector_erase_cmd, chip->in_progress_block_addr);
766 chip->oldstate = FL_READY; 765 chip->oldstate = FL_READY;
767 chip->state = FL_ERASING; 766 chip->state = FL_ERASING;