diff options
author | Vitaly Wool <vwool@ru.mvista.com> | 2005-11-02 16:54:46 +0000 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-11-07 02:15:21 +0100 |
commit | 49196f3332e661ccc221734c3103115d8cd4ee49 (patch) | |
tree | a3bc3c5304dbf6945479821a124dc5ba03475fe3 /drivers/mtd/nand | |
parent | 46d0d0fb61ec6630dc2c844e3c5bf5ef44dedcbe (diff) | |
download | op-kernel-dev-49196f3332e661ccc221734c3103115d8cd4ee49.zip op-kernel-dev-49196f3332e661ccc221734c3103115d8cd4ee49.tar.gz |
[MTD] NAND nand_base: Fix shift for bad block check (16bit devices only)
In case of an odd offset, the result was shifted by 1 instead of 8
Signed-off-by: Vitaly Wool <vwool@ru.mvista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 4e22317..c7b1ce3 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -433,7 +433,7 @@ static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) this->cmdfunc (mtd, NAND_CMD_READOOB, this->badblockpos & 0xFE, page & this->pagemask); bad = cpu_to_le16(this->read_word(mtd)); if (this->badblockpos & 0x1) - bad >>= 1; + bad >>= 8; if ((bad & 0xFF) != 0xff) res = 1; } else { |