mtd: pxa3xx_nand don't specify default parsing options
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Mon Nov 7 11:59:09 EST 2011
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=c842f570a6e3ac002389ab7154084e32f4f5021a
Commit: c842f570a6e3ac002389ab7154084e32f4f5021a
Parent: 16b206e62f9b43ba864571a6808844aaddea7479
Author: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
AuthorDate: Sun May 29 20:17:06 2011 +0400
Committer: Artem Bityutskiy <artem.bityutskiy at intel.com>
CommitDate: Sun Sep 11 15:02:03 2011 +0300
mtd: pxa3xx_nand don't specify default parsing options
Since 'cmdline, NULL' is now a default for parse_mtd_partitions, don't specify
this in every driver, instead pass NULL to force parse_mtd_partitions
to use default.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
---
drivers/mtd/nand/pxa3xx_nand.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index e11f926..c7da3c8 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1129,6 +1129,8 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
{
struct pxa3xx_nand_platform_data *pdata;
struct pxa3xx_nand_info *info;
+ struct mtd_partition *parts;
+ int nr_parts;
pdata = pdev->dev.platform_data;
if (!pdata) {
@@ -1146,16 +1148,11 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
return -ENODEV;
}
- if (mtd_has_cmdlinepart()) {
- const char *probes[] = { "cmdlinepart", NULL };
- struct mtd_partition *parts;
- int nr_parts;
- nr_parts = parse_mtd_partitions(info->mtd, probes, &parts, 0);
+ nr_parts = parse_mtd_partitions(info->mtd, NULL, &parts, 0);
- if (nr_parts)
- return mtd_device_register(info->mtd, parts, nr_parts);
- }
+ if (nr_parts)
+ return mtd_device_register(info->mtd, parts, nr_parts);
return mtd_device_register(info->mtd, pdata->parts, pdata->nr_parts);
}
More information about the linux-mtd-cvs
mailing list