Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5f172dc authored by Lubomir Rintel's avatar Lubomir Rintel Committed by Artem Bityutskiy
Browse files

mtd: cmdlinepart: Make it into a module



All other partitioning schemes can be compiled as modules

Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent f7226893
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -74,8 +74,8 @@ config MTD_REDBOOT_PARTS_READONLY
endif # MTD_REDBOOT_PARTS
endif # MTD_REDBOOT_PARTS


config MTD_CMDLINE_PARTS
config MTD_CMDLINE_PARTS
	bool "Command line partition table parsing"
	tristate "Command line partition table parsing"
	depends on MTD = "y"
	depends on MTD
	---help---
	---help---
	  Allow generic configuration of the MTD partition tables via the kernel
	  Allow generic configuration of the MTD partition tables via the kernel
	  command line. Multiple flash resources are supported for hardware where
	  command line. Multiple flash resources are supported for hardware where
+7 −1
Original line number Original line Diff line number Diff line
@@ -81,6 +81,7 @@ struct cmdline_mtd_partition {
static struct cmdline_mtd_partition *partitions;
static struct cmdline_mtd_partition *partitions;


/* the command line passed to mtdpart_setup() */
/* the command line passed to mtdpart_setup() */
static char *mtdparts;
static char *cmdline;
static char *cmdline;
static int cmdline_parsed;
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.
 * This function needs to be visible for bootloaders.
 */
 */
static int mtdpart_setup(char *s)
static int __init mtdpart_setup(char *s)
{
{
	cmdline = s;
	cmdline = s;
	return 1;
	return 1;
@@ -392,11 +393,16 @@ static struct mtd_part_parser cmdline_parser = {


static int __init cmdline_parser_init(void)
static int __init cmdline_parser_init(void)
{
{
	if (mtdparts)
		mtdpart_setup(mtdparts);
	return register_mtd_parser(&cmdline_parser);
	return register_mtd_parser(&cmdline_parser);
}
}


module_init(cmdline_parser_init);
module_init(cmdline_parser_init);


MODULE_PARM_DESC(mtdparts, "Partitioning specification");
module_param(mtdparts, charp, 0);

MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Marius Groeger <mag@sysgo.de>");
MODULE_AUTHOR("Marius Groeger <mag@sysgo.de>");
MODULE_DESCRIPTION("Command line configuration of MTD partitions");
MODULE_DESCRIPTION("Command line configuration of MTD partitions");