diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-03-28 14:13:05 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-05-13 23:47:04 -0400 |
commit | f2e5a24480023db86ebd455c807aa30dc224ba9a (patch) | |
tree | cd2ef8dbac8960b7ea2d0b8a86c8f3745f480b7c | |
parent | 9ff00d58a915b6747ba2e843ab2d04c712b4dc32 (diff) |
mtd: plat_nand: Add default partition parser to driver
Use cmdlinepart as the default partition parser and allow the arch setup code
to still use their own partition parsers.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r-- | drivers/mtd/nand/plat_nand.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c index 6404e6e81b10..585639947f5d 100644 --- a/drivers/mtd/nand/plat_nand.c +++ b/drivers/mtd/nand/plat_nand.c | |||
@@ -23,6 +23,8 @@ struct plat_nand_data { | |||
23 | void __iomem *io_base; | 23 | void __iomem *io_base; |
24 | }; | 24 | }; |
25 | 25 | ||
26 | static const char *part_probe_types[] = { "cmdlinepart", NULL }; | ||
27 | |||
26 | /* | 28 | /* |
27 | * Probe for the NAND device. | 29 | * Probe for the NAND device. |
28 | */ | 30 | */ |
@@ -31,6 +33,7 @@ static int __devinit plat_nand_probe(struct platform_device *pdev) | |||
31 | struct platform_nand_data *pdata = pdev->dev.platform_data; | 33 | struct platform_nand_data *pdata = pdev->dev.platform_data; |
32 | struct plat_nand_data *data; | 34 | struct plat_nand_data *data; |
33 | struct resource *res; | 35 | struct resource *res; |
36 | const char **part_types; | ||
34 | int err = 0; | 37 | int err = 0; |
35 | 38 | ||
36 | if (pdata->chip.nr_chips < 1) { | 39 | if (pdata->chip.nr_chips < 1) { |
@@ -98,8 +101,9 @@ static int __devinit plat_nand_probe(struct platform_device *pdev) | |||
98 | goto out; | 101 | goto out; |
99 | } | 102 | } |
100 | 103 | ||
101 | err = mtd_device_parse_register(&data->mtd, | 104 | part_types = pdata->chip.part_probe_types ? : part_probe_types; |
102 | pdata->chip.part_probe_types, NULL, | 105 | |
106 | err = mtd_device_parse_register(&data->mtd, part_types, NULL, | ||
103 | pdata->chip.partitions, | 107 | pdata->chip.partitions, |
104 | pdata->chip.nr_partitions); | 108 | pdata->chip.nr_partitions); |
105 | 109 | ||