diff options
author | Kyungmin Park <kyungmin.park@samsung.com> | 2008-05-06 22:54:10 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2008-06-05 02:51:13 -0400 |
commit | ba75321193900a236bc5bbc29145e1039f74eb1b (patch) | |
tree | c3c81598d120b3cadc8b2316f5ceb003ae7ab58b /drivers | |
parent | 9b62d864314736fb6cc5c5db5b964d4a3c093424 (diff) |
[MTD] [MAPS] Fix cmdlineparse handling in mapping files
Now it returns the 0 if cmdlineparse not supplied.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/maps/omap_nor.c | 2 | ||||
-rw-r--r-- | drivers/mtd/onenand/generic.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c index 240b0e2d095d..c12d8056bebd 100644 --- a/drivers/mtd/maps/omap_nor.c +++ b/drivers/mtd/maps/omap_nor.c | |||
@@ -110,7 +110,7 @@ static int __init omapflash_probe(struct platform_device *pdev) | |||
110 | err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0); | 110 | err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0); |
111 | if (err > 0) | 111 | if (err > 0) |
112 | add_mtd_partitions(info->mtd, info->parts, err); | 112 | add_mtd_partitions(info->mtd, info->parts, err); |
113 | else if (err < 0 && pdata->parts) | 113 | else if (err <= 0 && pdata->parts) |
114 | add_mtd_partitions(info->mtd, pdata->parts, pdata->nr_parts); | 114 | add_mtd_partitions(info->mtd, pdata->parts, pdata->nr_parts); |
115 | else | 115 | else |
116 | #endif | 116 | #endif |
diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c index 3d44d040a47d..ad81ab8e95e2 100644 --- a/drivers/mtd/onenand/generic.c +++ b/drivers/mtd/onenand/generic.c | |||
@@ -76,7 +76,7 @@ static int __devinit generic_onenand_probe(struct device *dev) | |||
76 | err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0); | 76 | err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0); |
77 | if (err > 0) | 77 | if (err > 0) |
78 | add_mtd_partitions(&info->mtd, info->parts, err); | 78 | add_mtd_partitions(&info->mtd, info->parts, err); |
79 | else if (err < 0 && pdata->parts) | 79 | else if (err <= 0 && pdata->parts) |
80 | add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts); | 80 | add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts); |
81 | else | 81 | else |
82 | #endif | 82 | #endif |