dfu: mtd: remove direct call of mtdparts_init function
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Thu, 8 Jun 2023 15:16:39 +0000 (17:16 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 16 Jun 2023 09:01:16 +0000 (11:01 +0200)
commit28d3439f1b343f1299c8e92a673ceca2d9296baa
tree9468c0c2caa8ba9bd7faecaa089457dfd5916856
parent163c5f60ebb492eb3bab75e299cb43e6d022653d
dfu: mtd: remove direct call of mtdparts_init function

With MTD support in driver model, the direct call of mtdparts_init
should be avoided and replaced by mtd_probe_devices.

With the modificaton when MTDIDS/MTDPARTS are empty the OF fallback
with partition describe in device tree is correctly performed,
introduced by commit dc339bf784f0 ("mtd: add support for parsing
partitions defined in OF").
With this patch the dependency with CONFIG_CMD_MTDPARTS is removed.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
drivers/dfu/Kconfig
drivers/dfu/dfu_mtd.c