]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Revert "mtd: core: always create master device"
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 18 Jun 2025 08:54:44 +0000 (10:54 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 18 Jun 2025 09:18:23 +0000 (11:18 +0200)
commit635e118317ffa773f6d25ec6a71b7927d7e8886a
tree6162f9ec07b412a1b9294a95cc06f7f171fa501f
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494
Revert "mtd: core: always create master device"

The idea behind this patch was to always let a "master" mtd device
available to anchor runtime PM. Historically, there was no mtd device
representing the whole storage as soon as partitions were coming into
play. The introduction of CONFIG_MTD_PARTITIONED_MASTER allowed to keep
this "master" device, but was not enabled by default to avoid breaking
existing users (otherwise the mtd device numbering would be totally
messed up with an off by 1, at least).

The approach of adding an mtd_master class on top of partitioned mtd
devices is breaking the mtd core in many creative ways, so better think
again this approach and revert the faulty changes for now.

This reverts commit 0aa7b390fc40a871267a2328bbbefca8b37ad307.

Fixes: 0aa7b390fc40 ("mtd: core: always create master device")
Tested-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/mtdchar.c
drivers/mtd/mtdcore.c
drivers/mtd/mtdcore.h
drivers/mtd/mtdpart.c
include/linux/mtd/partitions.h