OSDN Git Service

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 121be02..e1e122f 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 9a99a5b..23175ed 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 16dcd1c..65655dd 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),