diff options
author | Mark F. Brown <mark.brown314@gmail.com> | 2010-08-26 04:56:51 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-09-13 03:50:42 -0400 |
commit | 99d389640b58052884fb231bce9dbffb4f595aa4 (patch) | |
tree | ec7900017662bc1c6cfb9b11cdba967e5f9ad3c7 /drivers | |
parent | b8db2f51dcccbaf4d23ed44cd0c64856c58a16c0 (diff) |
mtd: pxa3xx: fix build error when CONFIG_MTD_PARTITIONS is not defined
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 4d89f3780207..4d01cda68844 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) | |||
1320 | goto fail_free_irq; | 1320 | goto fail_free_irq; |
1321 | } | 1321 | } |
1322 | 1322 | ||
1323 | #ifdef CONFIG_MTD_PARTITIONS | ||
1323 | if (mtd_has_cmdlinepart()) { | 1324 | if (mtd_has_cmdlinepart()) { |
1324 | static const char *probes[] = { "cmdlinepart", NULL }; | 1325 | static const char *probes[] = { "cmdlinepart", NULL }; |
1325 | struct mtd_partition *parts; | 1326 | struct mtd_partition *parts; |
@@ -1332,6 +1333,9 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) | |||
1332 | } | 1333 | } |
1333 | 1334 | ||
1334 | return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts); | 1335 | return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts); |
1336 | #else | ||
1337 | return 0; | ||
1338 | #endif | ||
1335 | 1339 | ||
1336 | fail_free_irq: | 1340 | fail_free_irq: |
1337 | free_irq(irq, info); | 1341 | free_irq(irq, info); |
@@ -1364,7 +1368,9 @@ static int pxa3xx_nand_remove(struct platform_device *pdev) | |||
1364 | platform_set_drvdata(pdev, NULL); | 1368 | platform_set_drvdata(pdev, NULL); |
1365 | 1369 | ||
1366 | del_mtd_device(mtd); | 1370 | del_mtd_device(mtd); |
1371 | #ifdef CONFIG_MTD_PARTITIONS | ||
1367 | del_mtd_partitions(mtd); | 1372 | del_mtd_partitions(mtd); |
1373 | #endif | ||
1368 | irq = platform_get_irq(pdev, 0); | 1374 | irq = platform_get_irq(pdev, 0); |
1369 | if (irq >= 0) | 1375 | if (irq >= 0) |
1370 | free_irq(irq, info); | 1376 | free_irq(irq, info); |