kernel: add DT binding support to the fit parser
authorChristian Lamparter <chunkeey@gmail.com>
Sat, 8 Dec 2018 20:54:10 +0000 (21:54 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 16 Dec 2018 23:21:33 +0000 (00:21 +0100)
It allows specifying default and Netgear parsers directly in the DT.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c

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