summaryrefslogtreecommitdiff
path: root/drivers/mtd/cmdlinepart.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2013-01-16 05:12:49 +0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-02-04 11:27:33 +0400
commitf5f172dc031ace288c5bb5d18f0b956db08241c2 (patch)
tree15e3b0da06c0c6de126d278164f7ead19f6986ed /drivers/mtd/cmdlinepart.c
parentf722689346afc1a0ed3fec8372c1762b6edc0c72 (diff)
downloadlinux-f5f172dc031ace288c5bb5d18f0b956db08241c2.tar.xz
mtd: cmdlinepart: Make it into a module
All other partitioning schemes can be compiled as modules Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/cmdlinepart.c')
-rw-r--r--drivers/mtd/cmdlinepart.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index 721d05c4ba8e..2e08fc45ce84 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/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 <mag@sysgo.de>");
MODULE_DESCRIPTION("Command line configuration of MTD partitions");