Skip to content

Commit

Permalink
mtd: Allow removal of partitioning modules
Browse files Browse the repository at this point in the history
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
  • Loading branch information
Lubomir Rintel authored and Artem Bityutskiy committed Feb 4, 2013
1 parent f5f172d commit 422f389
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/mtd/ar7part.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@ static int __init ar7_parser_init(void)
return register_mtd_parser(&ar7_parser);
}

static void __exit ar7_parser_exit(void)
{
deregister_mtd_parser(&ar7_parser);
}

module_init(ar7_parser_init);
module_exit(ar7_parser_exit);

MODULE_LICENSE("GPL");
MODULE_AUTHOR( "Felix Fietkau <nbd@openwrt.org>, "
Expand Down
6 changes: 6 additions & 0 deletions drivers/mtd/cmdlinepart.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,13 @@ static int __init cmdline_parser_init(void)
return register_mtd_parser(&cmdline_parser);
}

static void __exit cmdline_parser_exit(void)
{
deregister_mtd_parser(&cmdline_parser);
}

module_init(cmdline_parser_init);
module_exit(cmdline_parser_exit);

MODULE_PARM_DESC(mtdparts, "Partitioning specification");
module_param(mtdparts, charp, 0);
Expand Down
7 changes: 7 additions & 0 deletions drivers/mtd/ofpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,14 @@ static int __init ofpart_parser_init(void)
return rc;
}

static void __exit ofpart_parser_exit(void)
{
deregister_mtd_parser(&ofpart_parser);
deregister_mtd_parser(&ofoldpart_parser);
}

module_init(ofpart_parser_init);
module_exit(ofpart_parser_exit);

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Parser for MTD partitioning information in device tree");
Expand Down

0 comments on commit 422f389

Please sign in to comment.