mtd: core: call _get_device() with the master MTD

__get_mtd_device() calls the master's _get_device() callback with mtd,
which may be a partition. __put_mtd_device() passes the master.

This breaks gluebi partitions because gluebi_get_device() uses
container_of() and therefore requires the master MTD. Pass the master
to _get_device(), matching _put_device().

Fixes: 46b5889cc2 ("mtd: implement proper partition handling")
Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Karl Mehltretter <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
This commit is contained in:
Karl Mehltretter authored and Miquel Raynal committed 2026-09-04 19:11:26 +02:00
1 parent 26300879cd
commit 12b31d1acd
1 file changed
+1 -1
+1 -1
View File
@@ -1333,7 +1333,7 @@ int __get_mtd_device(struct mtd_info *mtd)
int err;
if (master->_get_device) {
err = master->_get_device(mtd);
err = master->_get_device(master);
if (err)
return err;
}