kernel: add DT binding support to the TP-LINK parser
It allows triggering it directly by specifying format in the DT. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
parent
ffd082aa38
commit
a29c8d685b
1 changed files with 10 additions and 0 deletions
|
@ -152,9 +152,19 @@ static int mtdsplit_parse_tplink(struct mtd_info *master,
|
||||||
return TPLINK_NR_PARTS;
|
return TPLINK_NR_PARTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||||
|
static const struct of_device_id mtdsplit_tplink_of_match_table[] = {
|
||||||
|
{ .compatible = "tplink,firmware" },
|
||||||
|
{},
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct mtd_part_parser mtdsplit_tplink_parser = {
|
static struct mtd_part_parser mtdsplit_tplink_parser = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.name = "tplink-fw",
|
.name = "tplink-fw",
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||||
|
.of_match_table = mtdsplit_tplink_of_match_table,
|
||||||
|
#endif
|
||||||
.parse_fn = mtdsplit_parse_tplink,
|
.parse_fn = mtdsplit_parse_tplink,
|
||||||
.type = MTD_PARSER_TYPE_FIRMWARE,
|
.type = MTD_PARSER_TYPE_FIRMWARE,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue