提交 8361a9b8 编写于 作者: B Brian Norris

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: NBrian Norris <computersforpeace@gmail.com>
Reviewed-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
上级 e270bca5
...@@ -309,6 +309,7 @@ static int of_flash_probe(struct platform_device *dev) ...@@ -309,6 +309,7 @@ static int of_flash_probe(struct platform_device *dev)
if (err) if (err)
goto err_out; goto err_out;
info->cmtd->dev.parent = &dev->dev;
mtd_set_of_node(info->cmtd, dp); mtd_set_of_node(info->cmtd, dp);
part_probe_types = of_get_probes(dp); part_probe_types = of_get_probes(dp);
if (!part_probe_types) { if (!part_probe_types) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册