summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips/fwh_lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/chips/fwh_lock.h')
-rw-r--r--drivers/mtd/chips/fwh_lock.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/chips/fwh_lock.h b/drivers/mtd/chips/fwh_lock.h
index 77303ce5dcf..ab44f2b996f 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,
return ret;
}
+ chip->oldstate = chip->state;
chip->state = xxlt->state;
map_write(map, CMD(xxlt->val), adr);
/* Done and happy. */
- chip->state = FL_READY;
+ chip->state = chip->oldstate;
put_chip(map, chip, adr);
spin_unlock(chip->mutex);
return 0;