mtd: mtdpart: 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. Signed-off-by:Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by:
Stefan Roese <sr@denx.de> Reviewed-by:
Boris Brezillon <boris.brezillon@bootlin.com>
Showing
- drivers/mtd/mtdcore.c 2 additions, 0 deletionsdrivers/mtd/mtdcore.c
- drivers/mtd/mtdpart.c 175 additions, 238 deletionsdrivers/mtd/mtdpart.c
- include/linux/mtd/mtd.h 32 additions, 0 deletionsinclude/linux/mtd/mtd.h
- include/linux/mtd/partitions.h 0 additions, 1 deletioninclude/linux/mtd/partitions.h
Loading
Please register or sign in to comment