From: Brian Norris Date: Sat, 31 Oct 2015 03:33:30 +0000 (-0700) Subject: mtd: physmap_of: assign parent for the concatenated MTD X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8361a9b8cb6a9c71b7cf884a87b2532d8367c185;p=linux-beck.git 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. Signed-off-by: Brian Norris Reviewed-by: Boris Brezillon --- diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index b78265688075..70c453144f00 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c @@ -309,6 +309,7 @@ static int of_flash_probe(struct platform_device *dev) if (err) goto err_out; + info->cmtd->dev.parent = &dev->dev; mtd_set_of_node(info->cmtd, dp); part_probe_types = of_get_probes(dp); if (!part_probe_types) {