diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-08-06 06:35:23 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-08-06 06:41:52 +0200 |
commit | 4b755ce06abe6f7a58325e77e1711a755c1bcbcc (patch) | |
tree | 7f45b2a7b974f4255ddcd8611410ab3fee30c068 /target/linux/generic | |
parent | 19cfbb1b34de5a6f7234c8615edaf3a497ba4d55 (diff) | |
download | upstream-4b755ce06abe6f7a58325e77e1711a755c1bcbcc.tar.gz upstream-4b755ce06abe6f7a58325e77e1711a755c1bcbcc.tar.bz2 upstream-4b755ce06abe6f7a58325e77e1711a755c1bcbcc.zip |
Revert "kernel: generic: fix fonfxc uimage parser"
This reverts commit e92a14709d37f64dcba8c81fa51e61e5f10f439a.
mtdsplit_uimage_parse_fonfxc() gets called in two situations:
1) It was /requested/ from DT using "fonfxc,uimage" compatible string
2) It was called by parsing code after finding "firmware"
(MTD_SPLIT_FIRMWARE_NAME) due to the parser's type
Code added in the /fix/ commit basically just disabled the second case.
If that's the real goal it could be achieved by simply dropping type
MTD_PARSER_TYPE_FIRMWARE. It may however require another solution as
it's possible that some non-DT target actually needs fonfxc uImage
parsing.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic')
-rw-r--r-- | target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c index 2ac559a3f3..091403ae91 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c @@ -398,29 +398,22 @@ static ssize_t uimage_find_fonfxc(u_char *buf, size_t len, int *extralen) return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) -static const struct of_device_id mtdsplit_uimage_fonfxc_of_match_table[] = { - { .compatible = "fonfxc,uimage" }, - {}, -}; -#endif - static int mtdsplit_uimage_parse_fonfxc(struct mtd_info *master, const struct mtd_partition **pparts, struct mtd_part_parser_data *data) { - struct device_node *np_mtd; - - np_mtd = mtd_get_of_node(master); - if (!np_mtd || - !of_match_node(mtdsplit_uimage_fonfxc_of_match_table, np_mtd)) - return -ENODEV; - return __mtdsplit_parse_uimage(master, pparts, data, uimage_find_fonfxc); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) +static const struct of_device_id mtdsplit_uimage_fonfxc_of_match_table[] = { + { .compatible = "fonfxc,uimage" }, + {}, +}; +#endif + static struct mtd_part_parser uimage_fonfxc_parser = { .owner = THIS_MODULE, .name = "fonfxc-fw", |