mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 10:39:04 +00:00
a3d2448fae
This fixes:
drivers/mtd/redboot.c:299:34: error: array type has incomplete element type 'struct of_device_id'
Fixes: 5e8b4be531
("kernel: add DT binding support to the mtd redboot parser")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
40 lines
1.1 KiB
Diff
40 lines
1.1 KiB
Diff
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
|
Subject: [PATCH] mtd: redboot: add of_match_table with DT binding
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
This allows parsing RedBoot compatible partitions for properly described
|
|
flash device in DT.
|
|
|
|
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
---
|
|
|
|
--- a/drivers/mtd/redboot.c
|
|
+++ b/drivers/mtd/redboot.c
|
|
@@ -29,6 +29,7 @@
|
|
#include <linux/mtd/mtd.h>
|
|
#include <linux/mtd/partitions.h>
|
|
#include <linux/module.h>
|
|
+#include <linux/mod_devicetable.h>
|
|
|
|
struct fis_image_desc {
|
|
unsigned char name[16]; // Null terminated name
|
|
@@ -289,9 +290,16 @@ static int parse_redboot_partitions(stru
|
|
return ret;
|
|
}
|
|
|
|
+static const struct of_device_id redboot_parser_of_match_table[] = {
|
|
+ { .compatible = "redhat,redboot-partitions" },
|
|
+ {},
|
|
+};
|
|
+MODULE_DEVICE_TABLE(of, redboot_parser_of_match_table);
|
|
+
|
|
static struct mtd_part_parser redboot_parser = {
|
|
.parse_fn = parse_redboot_partitions,
|
|
.name = "RedBoot",
|
|
+ .of_match_table = redboot_parser_of_match_table,
|
|
};
|
|
module_mtd_part_parser(redboot_parser);
|
|
|