The patch titled mtd/bfin-async-flash: use parse_mtd() has been added to the -mm tree. Its filename is mtd-bfin-async-flash-use-parse_mtd.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: mtd/bfin-async-flash: use parse_mtd() From: Mike Frysinger <vapier@xxxxxxxxxx> Call parse_mtd() to handle partition/device registration rather than doing it all ourself. Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx> Cc: Atsushi Nemoto <anemo@xxxxxxxxxxxxx> Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/mtd/maps/bfin-async-flash.c | 28 ++------------------------ 1 file changed, 3 insertions(+), 25 deletions(-) diff -puN drivers/mtd/maps/bfin-async-flash.c~mtd-bfin-async-flash-use-parse_mtd drivers/mtd/maps/bfin-async-flash.c --- a/drivers/mtd/maps/bfin-async-flash.c~mtd-bfin-async-flash-use-parse_mtd +++ a/drivers/mtd/maps/bfin-async-flash.c @@ -120,13 +120,8 @@ static void bfin_copy_to(struct map_info switch_back(state); } -#ifdef CONFIG_MTD_PARTITIONS -static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL }; -#endif - static int __devinit bfin_flash_probe(struct platform_device *pdev) { - int ret; struct physmap_flash_data *pdata = pdev->dev.platform_data; struct resource *memory = platform_get_resource(pdev, IORESOURCE_MEM, 0); struct resource *flash_ambctl = platform_get_resource(pdev, IORESOURCE_MEM, 1); @@ -150,6 +145,8 @@ static int __devinit bfin_flash_probe(st state->flash_ambctl0 = flash_ambctl->start; state->flash_ambctl1 = flash_ambctl->end; + platform_set_drvdata(pdev, state); + if (gpio_request(state->enet_flash_pin, DRIVER_NAME)) { pr_devinit(KERN_ERR DRIVER_NAME ": Failed to request gpio %d\n", state->enet_flash_pin); return -EBUSY; @@ -161,26 +158,7 @@ static int __devinit bfin_flash_probe(st if (!state->mtd) return -ENXIO; -#ifdef CONFIG_MTD_PARTITIONS - ret = parse_mtd_partitions(state->mtd, part_probe_types, &pdata->parts, 0); - if (ret > 0) { - pr_devinit(KERN_NOTICE DRIVER_NAME ": Using commandline partition definition\n"); - add_mtd_partitions(state->mtd, pdata->parts, ret); - - } else if (pdata->nr_parts) { - pr_devinit(KERN_NOTICE DRIVER_NAME ": Using board partition definition\n"); - add_mtd_partitions(state->mtd, pdata->parts, pdata->nr_parts); - - } else -#endif - { - pr_devinit(KERN_NOTICE DRIVER_NAME ": no partition info available, registering whole flash at once\n"); - add_mtd_device(state->mtd); - } - - platform_set_drvdata(pdev, state); - - return 0; + return parse_mtd(state->mtd, NULL, pdata->parts, pdata->nr_parts); } static int __devexit bfin_flash_remove(struct platform_device *pdev) _ Patches currently in -mm which might be from vapier@xxxxxxxxxx are origin.patch linux-next.patch linux-timexh-cleanup-for-userspace.patch m25p80-fix-detection-of-spi-parts.patch m25p80-fix-detection-of-m25p16-flashes.patch mtd-unify-mtd-partition-device-registration.patch mtd-unify-mtd-partition-device-registration-fix.patch mtd-physmap-use-parse_mtd.patch mtd-bfin-async-flash-use-parse_mtd.patch linux-serialh-touchup-for-userspace.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html