On Wed, 3 Oct 2018 21:38:59 +0200 Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx> wrote: > Allow creating gpio-addr-flash via device-tree and not just via platform > data. > > Option parsing has been moved to separated functions. > > Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx> > --- > drivers/mtd/maps/gpio-addr-flash.c | 95 +++++++++++++++++++++++++++--- > 1 file changed, 87 insertions(+), 8 deletions(-) > > diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c > index 9e370e3158cd..1be2df81087a 100644 > --- a/drivers/mtd/maps/gpio-addr-flash.c > +++ b/drivers/mtd/maps/gpio-addr-flash.c > @@ -7,6 +7,7 @@ > * > * Copyright © 2000 Nicolas Pitre <nico@xxxxxxx> > * Copyright © 2005-2009 Analog Devices Inc. > + * Copyright © 2018 Ricardo Ribalda <ricardo.ribalda@xxxxxxxxx> Would you mind moving the copyright update to a separate patch? > + > +static void gf_device_parse_register(struct platform_device *pdev, > + struct async_state *state) > +{ > + static const char * const part_probe_types[] = { > + "cmdlinepart", "RedBoot", "ofpart", "ofoldpart", NULL }; > + struct device_node *dn; > + > + dn = pdev->dev.of_node; > + if (!dn) { > + struct physmap_flash_data *pdata; > + > + pdata = dev_get_platdata(&pdev->dev); > + mtd_device_parse_register(state->mtd, part_probe_types, NULL, > + pdata->parts, pdata->nr_parts); > + return; > + } > + > + mtd_device_parse_register(state->mtd, part_probe_types, NULL, NULL, 0); Looks like you keep ignoring the mtd_device_parse_register() return. Probably something you should fix at some point. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/