]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/chips/fwh_lock.h
Merge branch 'linux-2.6' into for-2.6.22
[linux-2.6-omap-h63xx.git] / drivers / mtd / chips / fwh_lock.h
index 77303ce5dcf1699d3097a76a25935d884f515fb3..ab44f2b996f8ceb4f2729fa8fdc7c1956386a1d6 100644 (file)
@@ -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;