X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmtd%2Fchips%2Ffwh_lock.h;h=ab44f2b996f8ceb4f2729fa8fdc7c1956386a1d6;hb=abc5e92262d87f9c5c628492bffc55f81c7dcb80;hp=77303ce5dcf1699d3097a76a25935d884f515fb3;hpb=4060994c3e337b40e0f6fa8ce2cc178e021baf3d;p=linux-2.6 diff --git a/drivers/mtd/chips/fwh_lock.h b/drivers/mtd/chips/fwh_lock.h index 77303ce5dc..ab44f2b996 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;