History

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.

Miquel Raynal committed 1 year ago

Commit 635e1181 parent 19272b35 files · +51 −123Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/mtd/partitions.h+1−1
@@ -108,7 +108,7 @@ extern void deregister_mtd_parser(struct mtd_part_parser *parser); · 107 unmodified lines
108 deregister_mtd_parser)108 deregister_mtd_parser)
109 109
110int mtd_add_partition(struct mtd_info *master, const char *name,110int mtd_add_partition(struct mtd_info *master, const char *name,
111 long long offset, long long length, struct mtd_info **part);111 long long offset, long long length);
112int mtd_del_partition(struct mtd_info *master, int partno);112int mtd_del_partition(struct mtd_info *master, int partno);
113uint64_t mtd_get_device_size(const struct mtd_info *mtd);113uint64_t mtd_get_device_size(const struct mtd_info *mtd);
114 114