aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit_lzma.c7
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit_seama.c7
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit_squashfs.c7
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit_uimage.c19
-rw-r--r--target/linux/generic/files/drivers/mtd/myloader.c4
5 files changed, 19 insertions, 25 deletions
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit_lzma.c b/target/linux/generic/files/drivers/mtd/mtdsplit_lzma.c
index d23060a7d5..64dc7cb31c 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit_lzma.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit_lzma.c
@@ -86,10 +86,11 @@ static struct mtd_part_parser mtdsplit_lzma_parser = {
.type = MTD_PARSER_TYPE_FIRMWARE,
};
-static int
-mtdsplit_lzma_init(void)
+static int __init mtdsplit_lzma_init(void)
{
- return register_mtd_parser(&mtdsplit_lzma_parser);
+ register_mtd_parser(&mtdsplit_lzma_parser);
+
+ return 0;
}
subsys_initcall(mtdsplit_lzma_init);
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit_seama.c b/target/linux/generic/files/drivers/mtd/mtdsplit_seama.c
index 7a2dc7d855..6f21f8fb58 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit_seama.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit_seama.c
@@ -93,10 +93,11 @@ static struct mtd_part_parser mtdsplit_seama_parser = {
.type = MTD_PARSER_TYPE_FIRMWARE,
};
-static int
-mtdsplit_seama_init(void)
+static int __init mtdsplit_seama_init(void)
{
- return register_mtd_parser(&mtdsplit_seama_parser);
+ register_mtd_parser(&mtdsplit_seama_parser);
+
+ return 0;
}
subsys_initcall(mtdsplit_seama_init);
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit_squashfs.c b/target/linux/generic/files/drivers/mtd/mtdsplit_squashfs.c
index 7953e8c382..3d80e078b5 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit_squashfs.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit_squashfs.c
@@ -62,10 +62,11 @@ static struct mtd_part_parser mtdsplit_squashfs_parser = {
.type = MTD_PARSER_TYPE_ROOTFS,
};
-static int
-mtdsplit_squashfs_init(void)
+static int __init mtdsplit_squashfs_init(void)
{
- return register_mtd_parser(&mtdsplit_squashfs_parser);
+ register_mtd_parser(&mtdsplit_squashfs_parser);
+
+ return 0;
}
subsys_initcall(mtdsplit_squashfs_init);
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit_uimage.c b/target/linux/generic/files/drivers/mtd/mtdsplit_uimage.c
index 94b22f67e2..de55297870 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit_uimage.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit_uimage.c
@@ -271,23 +271,12 @@ static struct mtd_part_parser uimage_netgear_parser = {
.type = MTD_PARSER_TYPE_FIRMWARE,
};
-static int mtdsplit_uimage_init(void)
+static int __init mtdsplit_uimage_init(void)
{
- int ret;
-
- ret = register_mtd_parser(&uimage_generic_parser);
- if (ret)
- return ret;
-
- ret = register_mtd_parser(&uimage_netgear_parser);
- if (ret)
- goto err_unregister_generic;
+ register_mtd_parser(&uimage_generic_parser);
+ register_mtd_parser(&uimage_netgear_parser);
return 0;
-
-err_unregister_generic:
- deregister_mtd_parser(&uimage_generic_parser);
- return ret;
}
-module_init(mtdsplit_uimage_init); \ No newline at end of file
+module_init(mtdsplit_uimage_init);
diff --git a/target/linux/generic/files/drivers/mtd/myloader.c b/target/linux/generic/files/drivers/mtd/myloader.c
index 72956cdc1c..cd573690a7 100644
--- a/target/linux/generic/files/drivers/mtd/myloader.c
+++ b/target/linux/generic/files/drivers/mtd/myloader.c
@@ -164,7 +164,9 @@ static struct mtd_part_parser myloader_mtd_parser = {
static int __init myloader_mtd_parser_init(void)
{
- return register_mtd_parser(&myloader_mtd_parser);
+ register_mtd_parser(&myloader_mtd_parser);
+
+ return 0;
}
static void __exit myloader_mtd_parser_exit(void)