diff mbox series

[OpenWrt-Devel,v2,1/7] kernel: add DT binding support to the fit parser

Message ID 88eda56e4793d55a940ae17d3e62765d32cd5f9c.1544905645.git.chunkeey@gmail.com
State Accepted, archived
Delegated to: Christian Lamparter
Headers show
Series [OpenWrt-Devel,v2,1/7] kernel: add DT binding support to the fit parser | expand

Commit Message

Christian Lamparter Dec. 15, 2018, 9:02 p.m. UTC
It allows specifying default and Netgear parsers directly in the DT.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
---
 .../linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
index f356adcd4e..f9e5e53a95 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
@@ -120,9 +120,15 @@  mtdsplit_fit_parse(struct mtd_info *mtd,
 	return 2;
 }
 
+static const struct of_device_id mtdsplit_fit_of_match_table[] = {
+	{ .compatible = "denx,fit" },
+	{},
+};
+
 static struct mtd_part_parser uimage_parser = {
 	.owner = THIS_MODULE,
 	.name = "fit-fw",
+	.of_match_table = mtdsplit_fit_of_match_table,
 	.parse_fn = mtdsplit_fit_parse,
 	.type = MTD_PARSER_TYPE_FIRMWARE,
 };