mtd: remove duplicate assignment of chip->state
authorTadashi Abe <tabe@mvista.com>
Thu, 19 May 2011 07:17:50 +0000 (16:17 +0900)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 25 May 2011 01:11:13 +0000 (02:11 +0100)
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>
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/lpddr/lpddr_cmds.c

index 121be022d1eae7d1c4d07aae5f11fc96bbd53354..e1e122f2f92912bcc71d2418ffea1f3e77aeb3fa 100644 (file)
@@ -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
index 9a99a5bd3ea51da27f49eecc31c034c1c38a4e37..23175edd5634ff16190b4d7be6ca74d3392e5e80 100644 (file)
@@ -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;
index 16dcd1c76baf58971f37b6975b0a82a8d5f15d56..65655dd59e1f9e5948ac5bb138bd332abfa2cd05 100644 (file)
@@ -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),