[MTD] [NAND] fix OOPS accessing flash operations over STM flash on PXA
authorDenis V. Lunev <den@parallels.com>
Wed, 3 Dec 2008 10:47:20 +0000 (10:47 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 3 Dec 2008 10:47:20 +0000 (10:47 +0000)
STM 2Gb flash is a large-page NAND flash.  Set operations accordingly.
This field is dereferenced without a check in several places resulting in
OOPS.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Eric Miao <ymiao3@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/pxa3xx_nand.c

index c0fa9c9edf089c1a039ded475fb13740cfa52d1f..15f0a26730aea38e4c65708aac43473a8da02122 100644 (file)
@@ -269,6 +269,7 @@ static struct pxa3xx_nand_timing stm2GbX16_timing = {
 
 static struct pxa3xx_nand_flash stm2GbX16 = {
        .timing = &stm2GbX16_timing,
+       .cmdset = &largepage_cmdset,
        .page_per_block = 64,
        .page_size = 2048,
        .flash_width = 16,