MTD: enable partition parser in the default list when selected
PATCH 1/1 MTD: enable partition parser in the default list when selected
This patch makes the physmap driver use the partition parsers that we enable in the kernel configuration as the list of partition parsers to use when probing the flash chip.
Signed-off-by Florian Fainelli <[email protected]>
---
drivers/mtd/maps/physmap.c +10 -1
@@ -80,7 +80,16 @@ static const char *rom_probe_types[] = {"map_rom" , NULL };#ifdef CONFIG_MTD_PARTITIONS -static const char *part_probe_types[] = {"cmdlinepart" ,"RedBoot" ,NULL }; +static const char *part_probe_types[] = { +#ifdef CONFIG_MTD_CMDLINE_PARTS +"cmdlinepart" , +#elif defined CONFIG_MTD_REDBOOT_PARTS +"RedBoot" , +#elif defined CONFIG_MTD_AR7_PARTS +"ar7part" , +#endif +NULL +};#endif static int physmap_flash_probe (struct platform_device *dev)
Quoted 12 lines · Florian Fainelli
#ifdef
CONFIG_MTD_PARTITIONSdrivers/mtd/maps/physmap.c +10
-1-static const char *part_probe_types[] = {"cmdlinepart" ,"RedBoot" ,NULL }; +static const char *part_probe_types[] = { +#ifdef CONFIG_MTD_CMDLINE_PARTS + "cmdlinepart", +#elif defined CONFIG_MTD_REDBOOT_PARTS + "RedBoot", +#elif defined CONFIG_MTD_AR7_PARTS + "ar7part", +#endif + NULL +};
Quoted 1 line
#endif
you just broke systems that have both cmdline and redboot enabled -mike
Le Monday 22 June 2009 14:33:22 Mike Frysinger, vous avez écrit :
Quoted 9 lines · Florian Fainelli
Quoted 8 lines
#ifdef
CONFIG_MTD_PARTITIONS
-static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL }; +static const char *part_probe_types[] = {drivers/mtd/maps/physmap.c +5
-0+#ifdef CONFIG_MTD_CMDLINE_PARTS + "cmdlinepart", +#elif definedCONFIG_MTD_REDBOOT_PARTS + "RedBoot", +#elif definedCONFIG_MTD_AR7_PARTS
Quoted 8 lines
Quoted 5 lines
+ "ar7part",
drivers/mtd/maps/physmap.c +3
-0+#endif + NULL +};#endif
you just broke systems that have both cmdline and redboot enabled -mike
Right, let me respin that one.
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------