diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c index ddb3d3046a..55004a6d36 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c @@ -80,21 +80,15 @@ static int mtdsplit_parse_eva(struct mtd_info *master, return EVA_NR_PARTS; } -#include - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) static const struct of_device_id mtdsplit_eva_of_match_table[] = { { .compatible = "avm,eva-firmware" }, {}, }; -#endif static struct mtd_part_parser mtdsplit_eva_parser = { .owner = THIS_MODULE, .name = "eva-fw", - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) .of_match_table = mtdsplit_eva_of_match_table, - #endif .parse_fn = mtdsplit_parse_eva, .type = MTD_PARSER_TYPE_FIRMWARE, }; 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 98130be4d5..1770dd47ce 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_jimage.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_jimage.c @@ -257,21 +257,15 @@ mtdsplit_jimage_parse_generic(struct mtd_info *master, jimage_verify_default); } -#include - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 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, 14, 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_lzma.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c index 2d7b342b27..c58f7ae4bf 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c @@ -80,22 +80,16 @@ static int mtdsplit_parse_lzma(struct mtd_info *master, return LZMA_NR_PARTS; } -#include - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) static const struct of_device_id mtdsplit_lzma_of_match_table[] = { { .compatible = "lzma" }, {}, }; MODULE_DEVICE_TABLE(of, mtdsplit_lzma_of_match_table); -#endif static struct mtd_part_parser mtdsplit_lzma_parser = { .owner = THIS_MODULE, .name = "lzma-fw", - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) .of_match_table = mtdsplit_lzma_of_match_table, - #endif .parse_fn = mtdsplit_parse_lzma, .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 8c9012768b..af6822e11a 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_minor.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_minor.c @@ -101,22 +101,16 @@ static int mtdsplit_parse_minor(struct mtd_info *master, return MINOR_NR_PARTS; } -#include - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 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, 14, 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 de1ee61e42..5d49171b1f 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c @@ -94,22 +94,16 @@ static int mtdsplit_parse_seama(struct mtd_info *master, return SEAMA_NR_PARTS; } -#include - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 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, 14, 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 e00769494b..8909c107a0 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c @@ -153,21 +153,15 @@ static int mtdsplit_parse_tplink(struct mtd_info *master, return TPLINK_NR_PARTS; } -#include - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 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, 14, 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 208f3cfcac..b853ec9e52 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_trx.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_trx.c @@ -131,22 +131,16 @@ err: return ret; } -#include - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 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, 14, 0) .of_match_table = trx_parser_of_match_table, - #endif .parse_fn = mtdsplit_parse_trx, .type = MTD_PARSER_TYPE_FIRMWARE, }; diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c index fde49ece06..dfd6058ae7 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c @@ -118,22 +118,16 @@ static int mtdsplit_parse_wrgg(struct mtd_info *master, return WRGG_NR_PARTS; } -#include - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) static const struct of_device_id mtdsplit_wrgg_of_match_table[] = { { .compatible = "wrg" }, {}, }; MODULE_DEVICE_TABLE(of, mtdsplit_wrgg_of_match_table); -#endif static struct mtd_part_parser mtdsplit_wrgg_parser = { .owner = THIS_MODULE, .name = "wrgg-fw", - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) .of_match_table = mtdsplit_wrgg_of_match_table, - #endif .parse_fn = mtdsplit_parse_wrgg, .type = MTD_PARSER_TYPE_FIRMWARE, }; diff --git a/target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c b/target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c index e019094058..f9bba0f3ba 100644 --- a/target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c +++ b/target/linux/generic/files/drivers/mtd/parsers/routerbootpart.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0-only /* * Parser for MikroTik RouterBoot partitions. *