mtd: physmap_of: assign parent for the concatenated MTD
PATCH 1/1 mtd: physmap_of: assign parent for the concatenated MTD
If there is more than one map region for this device, then the concatenated MTD will not have a parent device assigned to it -- only the sub-devices (which are not actually registered with the framework) will have their parents assigned. Let's assign the concatenated device correctly.
---
This has a minor context conflict with [1], so I've just based this patch on top of it. I could adjust the context, depending on which comes first.
(I noticed this while passing through drivers for [1])
[1] http://lists.infradead.org/pipermail/linux-mtd/2015-October/062825.html
drivers/mtd/maps/physmap_of.c | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/maps/physmap_of.c +1 -0
@@ -309,6 +309,7 @@ static int of_flash_probe(struct platform_device *dev)if (err) goto err_out; + info->cmtd->dev.parent = &dev->dev; info->cmtd->dev.of_node = dp; part_probe_types =of_get_probes (dp);if (!part_probe_types) {
Signature · 1 line
2.6.0.rc2.230.g3dd15c0
Quoted 24 lines · Brian Norris
If there is more than one map region for this device, then the concatenated MTD will not have a parent device assigned to it -- only the sub-devices (which are not actually registered with the framework) will have their parents assigned. Let's assign the concatenated device correctly.
Signed-off-by Brian Norris <[email protected]>Cc Frans Klaver <[email protected]>---
This has a minor context conflict with [1], so I've just based this patch on top of it. I could adjust the context, depending on which comes first.(I noticed this while passing through drivers for [1])
[1] http://lists.infradead.org/pipermail/linux-mtd/2015-October/062825.html
drivers/mtd/maps/physmap_of.c | 1 + 1 file changed, 1 insertion(+)drivers/mtd/maps/physmap_of.c +0
-0
drivers/mtd/maps/physmap_of.c static int of_flash_probe(struct platform_device *dev) · line 315
Quoted 7 lines
drivers/mtd/maps/physmap_of.c +1
-0@@ -309,6 +309,7 @@ static int of_flash_probe(struct platform_device *dev)if (err) goto err_out; + info->cmtd->dev.parent = &dev->dev; info->cmtd->dev.of_node = dp; part_probe_types =of_get_probes (dp);if (!part_probe_types) {
That seems sensible.
Thanks,
Frans