diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-01-14 10:09:52 +0100 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-03-11 14:49:30 +0100 |
commit | 46b5889cc2c54bac7d7e727a44d28a298df23cef (patch) | |
tree | f3baa809955aa2f4769e3f95e51be986db9a34ee /tools | |
parent | 98d54f81e36ba3bf92172791eba5ca5bd813989b (diff) | |
download | linux-46b5889cc2c54bac7d7e727a44d28a298df23cef.tar.gz linux-46b5889cc2c54bac7d7e727a44d28a298df23cef.tar.bz2 linux-46b5889cc2c54bac7d7e727a44d28a298df23cef.zip |
mtd: implement proper partition handling
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 the mtd_part structure.
While at it, be consistent in the naming of the mtd_info structures to
ease the understanding of the new hierarchy: these structures are
usually called 'mtd', unless there are multiple instances of the same
structure. In this case, there is usually a parent/child bound so we
will call them 'parent' and 'child'.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200114090952.11232-1-miquel.raynal@bootlin.com
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions