kernel: add DT binding support to the Edimax uImage parser
authorMathias Kresin <dev@kresin.me>
Sat, 19 Jan 2019 09:12:53 +0000 (10:12 +0100)
committerMathias Kresin <dev@kresin.me>
Sat, 19 Jan 2019 11:51:04 +0000 (12:51 +0100)
It allows specifying those parsers directly in the DT.

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c

index e9b83149787f758689e88f0f6947f62371625ef2..bc2705ffad59f7e845edbb3990ec9b07ba239206 100644 (file)
@@ -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,
 };