]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
MTD: OMAP2-NAND: Fix partition reading from board info
authorNishant Kamat <nskamat@ti.com>
Thu, 3 Jul 2008 09:18:39 +0000 (04:18 -0500)
committerTony Lindgren <tony@atomide.com>
Mon, 4 Aug 2008 14:23:25 +0000 (17:23 +0300)
This patch fixes the omap2 nand driver code that allows
reading of partition data from board info.

The parse_mtd_partitions() function no longer returns a
negative error in case cmdline is not passed.
See commit: b0d06afb607

Signed-off-by: Nishant Kamat <nskamat@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/mtd/nand/omap2.c

index 3b7307c5f9f4efd7b451a571a96c385a758c8757..85793a3a7b686a27334964cfe989216471f61836 100644 (file)
@@ -636,7 +636,7 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
        err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
        if (err > 0)
                add_mtd_partitions(&info->mtd, info->parts, err);
-       else if (err < 0 && pdata->parts)
+       else if (pdata->parts)
                add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts);
        else
 #endif