aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorShmulik Ladkani <shmulik.ladkani@gmail.com>2012-06-10 13:58:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-13 05:28:15 +0900
commitad9ca19aefe3f7b593ecae8255b7cf7207e32b95 (patch)
tree1ec019092e00ede91252077dd86bec1239546dbc /drivers/mtd/nand
parent776a41b87e94f6942793c3268a49809a6691e4e2 (diff)
downloadkernel_samsung_espresso10-ad9ca19aefe3f7b593ecae8255b7cf7207e32b95.zip
kernel_samsung_espresso10-ad9ca19aefe3f7b593ecae8255b7cf7207e32b95.tar.gz
kernel_samsung_espresso10-ad9ca19aefe3f7b593ecae8255b7cf7207e32b95.tar.bz2
mtd: nand: Use the mirror BBT descriptor when reading its version
commit 7bb9c75436212813b38700c34df4bbb6eb82debe upstream. The code responsible for reading the version of the mirror bbt was incorrectly using the descriptor of the main bbt. Pass the mirror bbt descriptor to 'scan_read_raw' when reading the version of the mirror bbt. Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/nand_bbt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index cc81cd6..c27ca6a 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -429,7 +429,7 @@ static int read_abs_bbts(struct mtd_info *mtd, uint8_t *buf,
/* Read the mirror version, if available */
if (md && (md->options & NAND_BBT_VERSION)) {
scan_read_raw(mtd, buf, (loff_t)md->pages[0] << this->page_shift,
- mtd->writesize, td);
+ mtd->writesize, md);
md->version[0] = buf[bbt_get_ver_offs(mtd, md)];
printk(KERN_DEBUG "Bad block table at page %d, version 0x%02X\n",
md->pages[0], md->version[0]);