|
|
@ -100,9 +100,22 @@ static int mtdsplit_parse_minor(struct mtd_info *master,
|
|
|
|
return MINOR_NR_PARTS;
|
|
|
|
return MINOR_NR_PARTS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <linux/version.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
|
|
|
static const struct of_device_id mtdsplit_minor_of_match_table[] = {
|
|
|
|
|
|
|
|
{ .compatible = "mikrotik,minor" },
|
|
|
|
|
|
|
|
{},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
MODULE_DEVICE_TABLE(of, mtdsplit_minor_of_match_table);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
static struct mtd_part_parser mtdsplit_minor_parser = {
|
|
|
|
static struct mtd_part_parser mtdsplit_minor_parser = {
|
|
|
|
.owner = THIS_MODULE,
|
|
|
|
.owner = THIS_MODULE,
|
|
|
|
.name = "minor-fw",
|
|
|
|
.name = "minor-fw",
|
|
|
|
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
|
|
|
|
|
|
|
.of_match_table = mtdsplit_minor_of_match_table,
|
|
|
|
|
|
|
|
#endif
|
|
|
|
.parse_fn = mtdsplit_parse_minor,
|
|
|
|
.parse_fn = mtdsplit_parse_minor,
|
|
|
|
.type = MTD_PARSER_TYPE_FIRMWARE,
|
|
|
|
.type = MTD_PARSER_TYPE_FIRMWARE,
|
|
|
|
};
|
|
|
|
};
|
|
|
|