Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360359
b: refs/heads/master
c: f5f172d
h: refs/heads/master
i:
  360357: 3e039b6
  360355: 24744fc
  360351: 086cdec
v: v3
  • Loading branch information
Lubomir Rintel authored and Artem Bityutskiy committed Feb 4, 2013
1 parent b20abeb commit 684aa60
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f722689346afc1a0ed3fec8372c1762b6edc0c72
refs/heads/master: f5f172dc031ace288c5bb5d18f0b956db08241c2
4 changes: 2 additions & 2 deletions trunk/drivers/mtd/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/mtd/cmdlinepart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand All @@ -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");

0 comments on commit 684aa60

Please sign in to comment.