From: Christian Lamparter Date: Sat, 8 Dec 2018 20:54:10 +0000 (+0100) Subject: kernel: add DT binding support to the fit parser X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=40180b6305f55a7926153705eb5a84a9da33e597;p=openwrt%2Fstaging%2Fthess.git kernel: add DT binding support to the fit parser It allows specifying default and Netgear parsers directly in the DT. Signed-off-by: Christian Lamparter --- 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, };