diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/chips/fwh_lock.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/chips/fwh_lock.h b/drivers/mtd/chips/fwh_lock.h index 77303ce5dcf1..ab44f2b996f8 100644 --- a/drivers/mtd/chips/fwh_lock.h +++ b/drivers/mtd/chips/fwh_lock.h | |||
@@ -65,11 +65,12 @@ static int fwh_xxlock_oneblock(struct map_info *map, struct flchip *chip, | |||
65 | return ret; | 65 | return ret; |
66 | } | 66 | } |
67 | 67 | ||
68 | chip->oldstate = chip->state; | ||
68 | chip->state = xxlt->state; | 69 | chip->state = xxlt->state; |
69 | map_write(map, CMD(xxlt->val), adr); | 70 | map_write(map, CMD(xxlt->val), adr); |
70 | 71 | ||
71 | /* Done and happy. */ | 72 | /* Done and happy. */ |
72 | chip->state = FL_READY; | 73 | chip->state = chip->oldstate; |
73 | put_chip(map, chip, adr); | 74 | put_chip(map, chip, adr); |
74 | spin_unlock(chip->mutex); | 75 | spin_unlock(chip->mutex); |
75 | return 0; | 76 | return 0; |