linux/drivers/mtd
Miquel Raynal 46b5889cc2 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
2020-03-11 14:49:30 +01:00
..
chips mtd: cfi_cmdset_0002: fix delayed error detection on HyperFlash 2019-11-09 14:43:53 +05:30
devices MTD core 2020-01-30 15:46:02 -08:00
hyperbus mtd: hyperbus: fix dependency and build error 2019-08-29 14:31:23 +02:00
lpddr treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
maps MTD core 2020-01-30 15:46:02 -08:00
nand MTD core 2020-01-30 15:46:02 -08:00
parsers mtd: sharpslpart: Fix unsigned comparison to zero 2020-01-21 20:00:34 +01:00
spi-nor MTD core 2020-01-30 15:46:02 -08:00
tests treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 326 2019-06-05 17:37:06 +02:00
ubi treewide: remove redundant IS_ERR() before error code check 2020-02-04 03:05:27 +00:00
ftl.c treewide: Use array_size() in vmalloc() 2018-06-12 16:19:22 -07:00
inftlcore.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
inftlmount.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
Kconfig mtd: parsers: Move CMDLINE parser 2019-09-15 23:50:50 +02:00
Makefile mtd: parsers: Move CMDLINE parser 2019-09-15 23:50:50 +02:00
mtd_blkdevs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102 2019-05-24 17:39:00 +02:00
mtdblock_ro.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102 2019-05-24 17:39:00 +02:00
mtdblock.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 102 2019-05-24 17:39:00 +02:00
mtdchar.c mtd: implement proper partition handling 2020-03-11 14:49:30 +01:00
mtdconcat.c mtd: concat: Fix a comment referring to an unknown symbol 2020-01-27 17:45:31 +01:00
mtdcore.c mtd: implement proper partition handling 2020-03-11 14:49:30 +01:00
mtdcore.h mtd: Provide fs_context-aware mount_mtd() replacement 2019-09-05 14:34:23 -04:00
mtdoops.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
mtdpart.c mtd: implement proper partition handling 2020-03-11 14:49:30 +01:00
mtdsuper.c mtd: Kill mount_mtd() 2019-09-05 14:34:26 -04:00
mtdswap.c mtd: no need to check return value of debugfs_create functions 2019-11-14 10:57:38 +01:00
nftlcore.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
nftlmount.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
rfd_ftl.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
sm_ftl.c mtd: sm_ftl: fix NULL pointer warning 2020-01-09 20:09:55 +01:00
sm_ftl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ssfdc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00