summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2013-01-16 02:12:50 +0100
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-02-04 09:27:33 +0200
commit422f3890a68333cfd39f2133cf7255ed067e92e6 (patch)
tree960e669c91bc741449eba3857ef039c0a5e71223 /drivers/mtd
parentf5f172dc031ace288c5bb5d18f0b956db08241c2 (diff)
downloadlinux-3.10-422f3890a68333cfd39f2133cf7255ed067e92e6.tar.gz
linux-3.10-422f3890a68333cfd39f2133cf7255ed067e92e6.tar.bz2
linux-3.10-422f3890a68333cfd39f2133cf7255ed067e92e6.zip
mtd: Allow removal of partitioning modules
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ar7part.c6
-rw-r--r--drivers/mtd/cmdlinepart.c6
-rw-r--r--drivers/mtd/ofpart.c7
3 files changed, 19 insertions, 0 deletions
diff --git a/drivers/mtd/ar7part.c b/drivers/mtd/ar7part.c
index 7c057a05adb..ddc0a4287a4 100644
--- a/drivers/mtd/ar7part.c
+++ b/drivers/mtd/ar7part.c
@@ -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>, "
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index 2e08fc45ce8..721caebbc5c 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -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);
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
index dbd3aa574ea..30bd907a260 100644
--- a/drivers/mtd/ofpart.c
+++ b/drivers/mtd/ofpart.c
@@ -174,7 +174,14 @@ out:
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");