Message ID | 1307097169-11744-7-git-send-email-jamie@jamieiles.com |
---|---|
State | New, archived |
Headers | show |
On Fri, 2011-06-03 at 11:32 +0100, Jamie Iles wrote: > Add support for command line partitioning. This is favoured over > platform data based partitions. > > Cc: David Woodhouse <dwmw2@infradead.org> > Cc: Chuanxiao Dong <chuanxiao.dong@intel.com> > Cc: Artem Bityutskiy <dedekind1@gmail.com> > Signed-off-by: Jamie Iles <jamie@jamieiles.com> > --- > drivers/mtd/nand/denali.c | 9 ++++++++- > 1 files changed, 8 insertions(+), 1 deletions(-) I've just taken a set of patches from "Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>" which simplify the way to use just cmdlinepart parser, please, take a look - it is in the l2 tree.
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index e24e214..c48f5dd 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -1419,6 +1419,9 @@ static int denali_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) unsigned long csr_len, mem_len; struct denali_nand_info *denali; struct denali_nand_pdata *pdata; + struct mtd_partition *partitions = NULL; + int nr_parts = 0; + const char *part_probes[] = { "cmdlinepart", NULL }; denali = kzalloc(sizeof(*denali), GFP_KERNEL); if (!denali) @@ -1644,7 +1647,11 @@ static int denali_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) goto failed_req_irq; } - if (pdata && pdata->parts) + nr_parts = parse_mtd_partitions(&denali->mtd, part_probes, + &partitions, 0); + if (partitions && nr_parts > 0) + ret = mtd_device_register(&denali->mtd, partitions, nr_parts); + else if (pdata && pdata->parts) ret = mtd_device_register(&denali->mtd, pdata->parts, pdata->nr_parts); else
Add support for command line partitioning. This is favoured over platform data based partitions. Cc: David Woodhouse <dwmw2@infradead.org> Cc: Chuanxiao Dong <chuanxiao.dong@intel.com> Cc: Artem Bityutskiy <dedekind1@gmail.com> Signed-off-by: Jamie Iles <jamie@jamieiles.com> --- drivers/mtd/nand/denali.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)