On Tue, 2019-01-22 at 11:41:34 UTC, Miquel Raynal wrote: > Instead of collecting partitions in a flat list, create a hierarchy > within the mtd_info structure: use a partitions list to keep track of > the partitions of an MTD device (which might be itself a partition of > another MTD device), a pointer to the parent device (NULL when the MTD > device is the root one, not a partition). > > By also saving directly in mtd_info the offset of the partition, we > can get rid of an external mtd_part structure. However the mtd_info > structure now features a union of mtd_master_properties and > mtd_part_properties, which host respectively the master or the > partitions properties. > > All part_*() helpers are removed, the corresponding mtd_*() helpers > are updated to handle the partitions themselves. > > The part_absolute_offset() helper is also replaced by > mtd_get_master_offset() which is very similar but not recursive and > accepts an additional offset. Plus, it is used in both mtdcore and > mtdpart. > > While at it, try to be more explicit with the mtd_info structure > naming: > * we usually use 'mtd' > * however when there is a relationship between two mtd_info > structures, one (or both) might be called parent/child, > * master always refers to the 'root' device. > > Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> Applied to http://git.infradead.org/linux-mtd.git mtd/next, thanks. Boris ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/