diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-07 12:11:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-07 12:11:16 -0500 |
commit | e0d65113a70f1dc514e625cc4e7a7485a4bf72df (patch) | |
tree | 7320a130dc304623f5cf4b5dd8f67fb1776225ca /drivers/mtd/onenand/onenand_bbt.c | |
parent | cf5e15fbd72c13977720aa15b7b7e00e1d8fd8f2 (diff) | |
parent | 48e546b7f281f251893baa40769581fd15f085fb (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (226 commits)
mtd: tests: annotate as DANGEROUS in Kconfig
mtd: tests: don't use mtd0 as a default
mtd: clean up usage of MTD_DOCPROBE_ADDRESS
jffs2: add compr=lzo and compr=zlib options
jffs2: implement mount option parsing and compression overriding
mtd: nand: initialize ops.mode
mtd: provide an alias for the redboot module name
mtd: m25p80: don't probe device which has status of 'disabled'
mtd: nand_h1900 never worked
mtd: Add DiskOnChip G3 support
mtd: m25p80: add EON flash EN25Q32B into spi flash id table
mtd: mark block device queue as non-rotational
mtd: r852: make r852_pm_ops static
mtd: m25p80: add support for at25df321a spi data flash
mtd: mxc_nand: preset_v1_v2: unlock all NAND flash blocks
mtd: nand: switch `check_pattern()' to standard `memcmp()'
mtd: nand: invalidate cache on unaligned reads
mtd: nand: do not scan bad blocks with NAND_BBT_NO_OOB set
mtd: nand: wait to set BBT version
mtd: nand: scrub BBT on ECC errors
...
Fix up trivial conflicts:
- arch/arm/mach-at91/board-usb-a9260.c
Merged into board-usb-a926x.c
- drivers/mtd/maps/lantiq-flash.c
add_mtd_partitions -> mtd_device_register vs changed to use
mtd_device_parse_register.
Diffstat (limited to 'drivers/mtd/onenand/onenand_bbt.c')
-rw-r--r-- | drivers/mtd/onenand/onenand_bbt.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/mtd/onenand/onenand_bbt.c b/drivers/mtd/onenand/onenand_bbt.c index b2d7fc5ea25d..66fe3b7e7851 100644 --- a/drivers/mtd/onenand/onenand_bbt.c +++ b/drivers/mtd/onenand/onenand_bbt.c | |||
@@ -81,7 +81,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr | |||
81 | startblock = 0; | 81 | startblock = 0; |
82 | from = 0; | 82 | from = 0; |
83 | 83 | ||
84 | ops.mode = MTD_OOB_PLACE; | 84 | ops.mode = MTD_OPS_PLACE_OOB; |
85 | ops.ooblen = readlen; | 85 | ops.ooblen = readlen; |
86 | ops.oobbuf = buf; | 86 | ops.oobbuf = buf; |
87 | ops.len = ops.ooboffs = ops.retlen = ops.oobretlen = 0; | 87 | ops.len = ops.ooboffs = ops.retlen = ops.oobretlen = 0; |
@@ -154,7 +154,7 @@ static int onenand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) | |||
154 | block = (int) (onenand_block(this, offs) << 1); | 154 | block = (int) (onenand_block(this, offs) << 1); |
155 | res = (bbm->bbt[block >> 3] >> (block & 0x06)) & 0x03; | 155 | res = (bbm->bbt[block >> 3] >> (block & 0x06)) & 0x03; |
156 | 156 | ||
157 | DEBUG(MTD_DEBUG_LEVEL2, "onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n", | 157 | pr_debug("onenand_isbad_bbt: bbt info for offs 0x%08x: (block %d) 0x%02x\n", |
158 | (unsigned int) offs, block >> 1, res); | 158 | (unsigned int) offs, block >> 1, res); |
159 | 159 | ||
160 | switch ((int) res) { | 160 | switch ((int) res) { |
@@ -189,10 +189,8 @@ int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd) | |||
189 | len = this->chipsize >> (this->erase_shift + 2); | 189 | len = this->chipsize >> (this->erase_shift + 2); |
190 | /* Allocate memory (2bit per block) and clear the memory bad block table */ | 190 | /* Allocate memory (2bit per block) and clear the memory bad block table */ |
191 | bbm->bbt = kzalloc(len, GFP_KERNEL); | 191 | bbm->bbt = kzalloc(len, GFP_KERNEL); |
192 | if (!bbm->bbt) { | 192 | if (!bbm->bbt) |
193 | printk(KERN_ERR "onenand_scan_bbt: Out of memory\n"); | ||
194 | return -ENOMEM; | 193 | return -ENOMEM; |
195 | } | ||
196 | 194 | ||
197 | /* Set the bad block position */ | 195 | /* Set the bad block position */ |
198 | bbm->badblockpos = ONENAND_BADBLOCK_POS; | 196 | bbm->badblockpos = ONENAND_BADBLOCK_POS; |