aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2019-01-19 10:12:53 +0100
committerMathias Kresin <dev@kresin.me>2019-01-19 12:51:04 +0100
commit116d0f276d0fa61acc6018906f98af2e312a694d (patch)
tree1a24cf88bc64340064ee1f4d2f5f3f1170500556 /target/linux/generic/files
parent27be78ef461af31015a6c9cfc334b3c5c69b3953 (diff)
downloadupstream-116d0f276d0fa61acc6018906f98af2e312a694d.tar.gz
upstream-116d0f276d0fa61acc6018906f98af2e312a694d.tar.bz2
upstream-116d0f276d0fa61acc6018906f98af2e312a694d.zip
kernel: add DT binding support to the Edimax uImage parser
It allows specifying those parsers directly in the DT. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
index e9b8314978..bc2705ffad 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
@@ -359,9 +359,19 @@ mtdsplit_uimage_parse_edimax(struct mtd_info *master,
uimage_find_edimax);
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+static const struct of_device_id mtdsplit_uimage_edimax_of_match_table[] = {
+ { .compatible = "edimax,uimage" },
+ {},
+};
+#endif
+
static struct mtd_part_parser uimage_edimax_parser = {
.owner = THIS_MODULE,
.name = "edimax-fw",
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+ .of_match_table = mtdsplit_uimage_edimax_of_match_table,
+#endif
.parse_fn = mtdsplit_uimage_parse_edimax,
.type = MTD_PARSER_TYPE_FIRMWARE,
};