diff options
| author | Rafał Miłecki | 2018-11-24 08:55:15 +0000 |
|---|---|---|
| committer | Rafał Miłecki | 2018-11-24 08:56:53 +0000 |
| commit | a29c8d685be7fd701989f44e3b03ab5c7c373092 (patch) | |
| tree | dab27629eb1e1ea6b9137ca05d5b6a2bb8049151 | |
| parent | ffd082aa38e271c2e657a29758f1eebb9e49026b (diff) | |
| download | openwrt-a29c8d685be7fd701989f44e3b03ab5c7c373092.tar.gz | |
kernel: add DT binding support to the TP-LINK parser
It allows triggering it directly by specifying format in the DT.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
| -rw-r--r-- | target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 c346aa8130..bf33208996 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c @@ -152,9 +152,19 @@ 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, }; |