mtd: pxa3xx: fix build error when CONFIG_MTD_PARTITIONS is not defined
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Sep 13 04:59:03 EDT 2010
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=99d389640b58052884fb231bce9dbffb4f595aa4
Commit: 99d389640b58052884fb231bce9dbffb4f595aa4
Parent: b8db2f51dcccbaf4d23ed44cd0c64856c58a16c0
Author: Mark F. Brown <mark.brown314 at gmail.com>
AuthorDate: Thu Aug 26 04:56:51 2010 -0400
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Sep 13 08:50:42 2010 +0100
mtd: pxa3xx: fix build error when CONFIG_MTD_PARTITIONS is not defined
Signed-off-by: Mark F. Brown <mark.brown314 at gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/pxa3xx_nand.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 4d89f37..4d01cda6 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -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;
@@ -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);
@@ -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);
More information about the linux-mtd-cvs
mailing list