public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] physmap: probe for partitions parsers that we enable
@ 2009-07-15 10:11 Florian Fainelli
  2009-07-15 11:23 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2009-07-15 10:11 UTC (permalink / raw)
  To: dwmw2; +Cc: linux-mtd

This patch makes the physmap driver probe for partitions
parsers that we configured in the kernel configuration
instead of a hard-coded partition parser list (cmdlinepart,
RedBoot).

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 29a9011..e314f0d 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -80,7 +80,17 @@ 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",
+#endif
+#ifdef CONFIG_MTD_REDBOOT_PARTS
+	"RedBoot",
+#endif
+#ifdef CONFIG_MTD_AR7_PARTS
+	"ar7part",
+#endif
+	NULL };
 #endif
 
 static int physmap_flash_probe(struct platform_device *dev)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] physmap: probe for partitions parsers that we enable
  2009-07-15 10:11 [PATCH] physmap: probe for partitions parsers that we enable Florian Fainelli
@ 2009-07-15 11:23 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2009-07-15 11:23 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: linux-mtd, dwmw2

On Wed, Jul 15, 2009 at 06:11, Florian Fainelli wrote:
> This patch makes the physmap driver probe for partitions
> parsers that we configured in the kernel configuration
> instead of a hard-coded partition parser list (cmdlinepart,
> RedBoot).

i believe there was a thread on this list some time ago about how
forcing all maps to declare support partition types sucks.  be nice if
there was a mtd function to probe all available maps so we wouldnt
have to copy & paste this #ifdef mess everywhere.

> --- a/drivers/mtd/maps/physmap.c
> +++ b/drivers/mtd/maps/physmap.c
> @@ -80,7 +80,17 @@ 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",
> +#endif
> +#ifdef CONFIG_MTD_REDBOOT_PARTS
> +       "RedBoot",
> +#endif
> +#ifdef CONFIG_MTD_AR7_PARTS
> +       "ar7part",
> +#endif
> +       NULL };
>  #endif

me thinks you just broke support when redboot is a module.
cmdlinepart isnt allowed to be a module via Kconfig, but ar7 can be.
-mike

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-15 11:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15 10:11 [PATCH] physmap: probe for partitions parsers that we enable Florian Fainelli
2009-07-15 11:23 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox