Skip to content

Commit

Permalink
mtd: pxa3xx: fix build error when CONFIG_MTD_PARTITIONS is not defined
Browse files Browse the repository at this point in the history
Signed-off-by: Mark F. Brown <mark.brown314@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Mark F. Brown authored and David Woodhouse committed Sep 13, 2010
1 parent b8db2f5 commit 99d3896
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/mtd/nand/pxa3xx_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,7 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
goto fail_free_irq;
}

#ifdef CONFIG_MTD_PARTITIONS
if (mtd_has_cmdlinepart()) {
static const char *probes[] = { "cmdlinepart", NULL };
struct mtd_partition *parts;
Expand All @@ -1332,6 +1333,9 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
}

return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts);
#else
return 0;
#endif

fail_free_irq:
free_irq(irq, info);
Expand Down Expand Up @@ -1364,7 +1368,9 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);

del_mtd_device(mtd);
#ifdef CONFIG_MTD_PARTITIONS
del_mtd_partitions(mtd);
#endif
irq = platform_get_irq(pdev, 0);
if (irq >= 0)
free_irq(irq, info);
Expand Down

0 comments on commit 99d3896

Please sign in to comment.