Rebased from upstream / out of band repository.
[librecmc/librecmc.git] / target / linux / generic / files / drivers / mtd / mtdsplit / mtdsplit_fit.c
index 57954061cdc7d07a6f1fd998db2ebc05bc09d663..f9e5e53a951b5d0dad19d6212ab56a85402471f0 100644 (file)
@@ -45,7 +45,8 @@ struct fdt_header {
 };
 
 static int
-mtdsplit_fit_parse(struct mtd_info *mtd, struct mtd_partition **pparts,
+mtdsplit_fit_parse(struct mtd_info *mtd,
+                  const struct mtd_partition **pparts,
                   struct mtd_part_parser_data *data)
 {
        struct fdt_header hdr;
@@ -119,9 +120,15 @@ mtdsplit_fit_parse(struct mtd_info *mtd, struct mtd_partition **pparts,
        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,
 };