]> git.baikalelectronics.ru Git - uboot.git/commit
mtd: mtdpart: implement proper partition handling
authorMiquel Raynal <miquel.raynal@bootlin.com>
Sat, 29 Sep 2018 10:58:27 +0000 (12:58 +0200)
committerJagan Teki <jagan@amarulasolutions.com>
Tue, 2 Oct 2018 16:42:32 +0000 (22:12 +0530)
commitce385b5258b1ca73c9fcc55f4705cc4397409516
tree63905613152ac9d2850b75084c7aa3213d4d6825
parent016576ec07d358a88a60c504987b51fcf5313254
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>
drivers/mtd/mtdcore.c
drivers/mtd/mtdpart.c
include/linux/mtd/mtd.h
include/linux/mtd/partitions.h