Skip to contentSkip to conversation

mtd: provide an alias for the redboot module name

PATCH Applied Andres Salomon 2 participants 2 messages Oct 14, 2011 – Oct 16, 2011 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mtd: provide an alias for the redboot module name

parse_mtd_partitions takes a list of partition types; if the driver isn't loaded, it attempts to load it, and then it grabs the partition parser. For redboot, the module name is "redboot.ko", while the parser name is "RedBoot". Since modprobe is case-sensitive, attempting to modprobe "RedBoot" will never work. I suspect the embedded systems that make use of redboot just always manually loaded redboot prior to loading their specific nand chip drivers (or statically compiled it in).

---
 drivers/mtd/redboot.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

v2: instead of renaming the module, use a module_alias. Duh. Thanks, Artem Bityutskiy!

drivers/mtd/redboot.c +3 -0
index 7a87d07..4938bd0 100644
@@ -297,6 +297,9 @@ static struct mtd_part_parser redboot_parser = {
 	.name = "RedBoot",
 };
 
+/* mtd parsers will request the module by parser name */
+MODULE_ALIAS("RedBoot");
+
 static int __init redboot_parser_init(void)
 {
 	return register_mtd_parser(&redboot_parser);
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 8 lines · Andres Salomon

parse_mtd_partitions takes a list of partition types; if the driver isn't loaded, it attempts to load it, and then it grabs the partition parser. For redboot, the module name is "redboot.ko", while the parser name is "RedBoot". Since modprobe is case-sensitive, attempting to modprobe "RedBoot" will never work. I suspect the embedded systems that make use of redboot just always manually loaded redboot prior to loading their specific nand chip drivers (or statically compiled it in).

Quoted 8 lines
---
 drivers/mtd/redboot.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

v2: instead of renaming the module, use a module_alias. Duh. Thanks, Artem Bityutskiy!

Pushed to l2-mtd-2.6.git, thanks!

Signature · 2 lines
Best Regards,
Artem Bityutskiy