[U-Boot] [PATCH v6 29/31] cmd: mtd: add 'mtd' command
Boris Brezillon
boris.brezillon at bootlin.com
Thu Aug 16 20:38:59 UTC 2018
On Thu, 16 Aug 2018 17:30:27 +0200
Miquel Raynal <miquel.raynal at bootlin.com> wrote:
> +/*
> + * Ensure the MTD device partition list has been initialized already (needed for
> + * non DM-compliant devices).
I don't see what this has to do with DM vs non-DM drivers. All MTD
devices are registered to the MTD framework, right? So there's probably
a place where this list initialization can be done for everyone.
> + */
> +static void mtd_quirk_init_non_dm_device_lists(void)
> +{
> + struct mtd_info *mtd;
> +
> + mtd_for_each_device(mtd) {
> + if (!mtd_is_partition(mtd) && !mtd->partitions.next) {
> + INIT_LIST_HEAD(&mtd->partitions);
> + INIT_LIST_HEAD(&mtd->node);
Hm, how about moving this initialization in add_mtd_device()?
> + }
> + }
> +}
> +
More information about the U-Boot
mailing list