Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lubomir Rintel and committed by
Artem Bityutskiy
f5f172dc f7226893

+9 -3
+2 -2
drivers/mtd/Kconfig
··· 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
+7 -1
drivers/mtd/cmdlinepart.c
··· 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 ··· 377 376 * 378 377 * This function needs to be visible for bootloaders. 379 378 */ 380 - static int mtdpart_setup(char *s) 379 + static int __init mtdpart_setup(char *s) 381 380 { 382 381 cmdline = s; 383 382 return 1; ··· 393 392 394 393 static int __init cmdline_parser_init(void) 395 394 { 395 + if (mtdparts) 396 + mtdpart_setup(mtdparts); 396 397 return register_mtd_parser(&cmdline_parser); 397 398 } 398 399 399 400 module_init(cmdline_parser_init); 401 + 402 + MODULE_PARM_DESC(mtdparts, "Partitioning specification"); 403 + module_param(mtdparts, charp, 0); 400 404 401 405 MODULE_LICENSE("GPL"); 402 406 MODULE_AUTHOR("Marius Groeger <mag@sysgo.de>");