diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2014-05-08 21:51:36 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2014-05-08 21:51:36 +0000 |
commit | 3a2eca5351453ccaadf9ff6fec5d769bf721f4ee (patch) | |
tree | c395b211a6be4a24d8fa630ad31010d12a81e4f4 /target/linux/generic/files/drivers/mtd/myloader.c | |
parent | d98e49d6090a7f2952bbea40844504f13b5e57b0 (diff) | |
download | upstream-3a2eca5351453ccaadf9ff6fec5d769bf721f4ee.tar.gz upstream-3a2eca5351453ccaadf9ff6fec5d769bf721f4ee.tar.bz2 upstream-3a2eca5351453ccaadf9ff6fec5d769bf721f4ee.zip |
kernel/generic: modify mtd related patches for 3.14
Function register_mtd_parser always returned 0 (at least since v3.3)
before being changed to return void in v3.14-rc1~65^2~93 (mtd: make
register_mtd_parser return void), so it's not needed to check the
return value of this function. Also add __init flag to caller.
This fix compile errors in 3.14 kernel like:
drivers/mtd/mtdsplit_seama.c: In function 'mtdsplit_seama_init':
drivers/mtd/mtdsplit_seama.c:99:2: error: void value not ignored as it ought to be
return register_mtd_parser(&mtdsplit_seama_parser);
^
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40731 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/files/drivers/mtd/myloader.c')
-rw-r--r-- | target/linux/generic/files/drivers/mtd/myloader.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) |