From 684aa60ac7451914688fbf2b5aa5cb38687987dc Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Wed, 16 Jan 2013 02:12:49 +0100 Subject: [PATCH] --- yaml --- r: 360359 b: refs/heads/master c: f5f172dc031ace288c5bb5d18f0b956db08241c2 h: refs/heads/master i: 360357: 3e039b67b15c8ff659dd88f910457683381d1d19 360355: 24744fc7fd762291019fd68b827908178df96540 360351: 086cdeceebb6f2a68cf163b318373eab26ed9728 v: v3 --- [refs] | 2 +- trunk/drivers/mtd/Kconfig | 4 ++-- trunk/drivers/mtd/cmdlinepart.c | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index d63e60c45e58..04731944fbe7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f722689346afc1a0ed3fec8372c1762b6edc0c72 +refs/heads/master: f5f172dc031ace288c5bb5d18f0b956db08241c2 diff --git a/trunk/drivers/mtd/Kconfig b/trunk/drivers/mtd/Kconfig index 73fcbbeb78d0..4dd3b38ddac0 100644 --- a/trunk/drivers/mtd/Kconfig +++ b/trunk/drivers/mtd/Kconfig @@ -74,8 +74,8 @@ config MTD_REDBOOT_PARTS_READONLY endif # MTD_REDBOOT_PARTS config MTD_CMDLINE_PARTS - bool "Command line partition table parsing" - depends on MTD = "y" + tristate "Command line partition table parsing" + depends on MTD ---help--- Allow generic configuration of the MTD partition tables via the kernel command line. Multiple flash resources are supported for hardware where diff --git a/trunk/drivers/mtd/cmdlinepart.c b/trunk/drivers/mtd/cmdlinepart.c index 721d05c4ba8e..2e08fc45ce84 100644 --- a/trunk/drivers/mtd/cmdlinepart.c +++ b/trunk/drivers/mtd/cmdlinepart.c @@ -81,6 +81,7 @@ struct cmdline_mtd_partition { static struct cmdline_mtd_partition *partitions; /* the command line passed to mtdpart_setup() */ +static char *mtdparts; static char *cmdline; static int cmdline_parsed; @@ -376,7 +377,7 @@ static int parse_cmdline_partitions(struct mtd_info *master, * * This function needs to be visible for bootloaders. */ -static int mtdpart_setup(char *s) +static int __init mtdpart_setup(char *s) { cmdline = s; return 1; @@ -392,11 +393,16 @@ static struct mtd_part_parser cmdline_parser = { static int __init cmdline_parser_init(void) { + if (mtdparts) + mtdpart_setup(mtdparts); return register_mtd_parser(&cmdline_parser); } module_init(cmdline_parser_init); +MODULE_PARM_DESC(mtdparts, "Partitioning specification"); +module_param(mtdparts, charp, 0); + MODULE_LICENSE("GPL"); MODULE_AUTHOR("Marius Groeger "); MODULE_DESCRIPTION("Command line configuration of MTD partitions");