diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-12-13 16:59:21 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-12-13 16:59:21 +0100 |
commit | 816ae87709c01215319347a078f0668661c3f2dc (patch) | |
tree | a97620ce912953b32fea87aba4e9ab680aa83b30 /target/linux/generic/files/drivers/mtd/mtdsplit | |
parent | 2abb128f2ecb0ad6b6144ce249b3fc3ced34f2b1 (diff) | |
download | upstream-816ae87709c01215319347a078f0668661c3f2dc.tar.gz upstream-816ae87709c01215319347a078f0668661c3f2dc.tar.bz2 upstream-816ae87709c01215319347a078f0668661c3f2dc.zip |
kernel: drop unneeded LINUX_VERSION_CODE checks
All those parsers are used by 4.14 targets. They don't need that
backward compatibility code.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/files/drivers/mtd/mtdsplit')
5 files changed, 0 insertions, 28 deletions
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_jimage.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_jimage.c index 5c6c5b09ef..2b87fe4f8b 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_jimage.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_jimage.c @@ -19,7 +19,6 @@ #include <linux/vmalloc.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> -#include <linux/version.h> #include <linux/byteorder/generic.h> #include "mtdsplit.h" @@ -257,19 +256,15 @@ mtdsplit_jimage_parse_generic(struct mtd_info *master, jimage_verify_default); } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) static const struct of_device_id mtdsplit_jimage_of_match_table[] = { { .compatible = "amit,jimage" }, {}, }; -#endif static struct mtd_part_parser jimage_generic_parser = { .owner = THIS_MODULE, .name = "jimage-fw", -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) .of_match_table = mtdsplit_jimage_of_match_table, -#endif .parse_fn = mtdsplit_jimage_parse_generic, .type = MTD_PARSER_TYPE_FIRMWARE, }; diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_minor.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_minor.c index d709a13cf6..650ac6c9b4 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_minor.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_minor.c @@ -100,22 +100,16 @@ static int mtdsplit_parse_minor(struct mtd_info *master, return MINOR_NR_PARTS; } -#include <linux/version.h> - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) static const struct of_device_id mtdsplit_minor_of_match_table[] = { { .compatible = "mikrotik,minor" }, {}, }; MODULE_DEVICE_TABLE(of, mtdsplit_minor_of_match_table); -#endif static struct mtd_part_parser mtdsplit_minor_parser = { .owner = THIS_MODULE, .name = "minor-fw", -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) .of_match_table = mtdsplit_minor_of_match_table, -#endif .parse_fn = mtdsplit_parse_minor, .type = MTD_PARSER_TYPE_FIRMWARE, }; diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c index 2d70f9b375..815c28b965 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c @@ -93,22 +93,16 @@ static int mtdsplit_parse_seama(struct mtd_info *master, return SEAMA_NR_PARTS; } -#include <linux/version.h> - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) static const struct of_device_id mtdsplit_seama_of_match_table[] = { { .compatible = "seama" }, {}, }; MODULE_DEVICE_TABLE(of, mtdsplit_seama_of_match_table); -#endif static struct mtd_part_parser mtdsplit_seama_parser = { .owner = THIS_MODULE, .name = "seama-fw", -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) .of_match_table = mtdsplit_seama_of_match_table, -#endif .parse_fn = mtdsplit_parse_seama, .type = MTD_PARSER_TYPE_FIRMWARE, }; diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c index ff4a474d54..a6ae1440db 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c @@ -14,7 +14,6 @@ #include <linux/slab.h> #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> -#include <linux/version.h> #include <linux/byteorder/generic.h> #include "mtdsplit.h" @@ -153,19 +152,15 @@ static int mtdsplit_parse_tplink(struct mtd_info *master, return TPLINK_NR_PARTS; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) static const struct of_device_id mtdsplit_tplink_of_match_table[] = { { .compatible = "tplink,firmware" }, {}, }; -#endif static struct mtd_part_parser mtdsplit_tplink_parser = { .owner = THIS_MODULE, .name = "tplink-fw", -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) .of_match_table = mtdsplit_tplink_of_match_table, -#endif .parse_fn = mtdsplit_parse_tplink, .type = MTD_PARSER_TYPE_FIRMWARE, }; diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_trx.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_trx.c index d5e33727b5..4f6c4672ef 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_trx.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_trx.c @@ -130,22 +130,16 @@ err: return ret; } -#include <linux/version.h> - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) static const struct of_device_id trx_parser_of_match_table[] = { { .compatible = "openwrt,trx" }, {}, }; MODULE_DEVICE_TABLE(of, trx_parser_of_match_table); -#endif static struct mtd_part_parser trx_parser = { .owner = THIS_MODULE, .name = "trx-fw", -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) .of_match_table = trx_parser_of_match_table, -#endif .parse_fn = mtdsplit_parse_trx, .type = MTD_PARSER_TYPE_FIRMWARE, }; |