Commit f5f172dc031ace288c5bb5d18f0b956db08241c2

Authored by Lubomir Rintel
Committed by Artem Bityutskiy
1 parent f722689346

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>

Showing 2 changed files with 9 additions and 3 deletions Side-by-side Diff

... ... @@ -74,8 +74,8 @@
74 74 endif # MTD_REDBOOT_PARTS
75 75  
76 76 config MTD_CMDLINE_PARTS
77   - bool "Command line partition table parsing"
78   - depends on MTD = "y"
  77 + tristate "Command line partition table parsing"
  78 + depends on MTD
79 79 ---help---
80 80 Allow generic configuration of the MTD partition tables via the kernel
81 81 command line. Multiple flash resources are supported for hardware where
drivers/mtd/cmdlinepart.c
... ... @@ -81,6 +81,7 @@
81 81 static struct cmdline_mtd_partition *partitions;
82 82  
83 83 /* the command line passed to mtdpart_setup() */
  84 +static char *mtdparts;
84 85 static char *cmdline;
85 86 static int cmdline_parsed;
86 87  
... ... @@ -376,7 +377,7 @@
376 377 *
377 378 * This function needs to be visible for bootloaders.
378 379 */
379   -static int mtdpart_setup(char *s)
  380 +static int __init mtdpart_setup(char *s)
380 381 {
381 382 cmdline = s;
382 383 return 1;
383 384  
... ... @@ -392,10 +393,15 @@
392 393  
393 394 static int __init cmdline_parser_init(void)
394 395 {
  396 + if (mtdparts)
  397 + mtdpart_setup(mtdparts);
395 398 return register_mtd_parser(&cmdline_parser);
396 399 }
397 400  
398 401 module_init(cmdline_parser_init);
  402 +
  403 +MODULE_PARM_DESC(mtdparts, "Partitioning specification");
  404 +module_param(mtdparts, charp, 0);
399 405  
400 406 MODULE_LICENSE("GPL");
401 407 MODULE_AUTHOR("Marius Groeger <mag@sysgo.de>");