summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Hancock <hancock@sedsystems.ca>2019-06-05 01:35:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-04 10:33:39 +0300
commitf1405059725a8cdac363f6dd98fad4479bab319d (patch)
tree20e805876779d5e7a4c8c58726a7404e57a0ffc4
parent253278f2b5062e05cae6d46fe08b849d9be32336 (diff)
downloadlinux-f1405059725a8cdac363f6dd98fad4479bab319d.tar.xz
mfd: core: Set fwnode for created devices
[ Upstream commit c176c6d7e932662668bcaec2d763657096589d85 ] The logic for setting the of_node on devices created by mfd did not set the fwnode pointer to match, which caused fwnode-based APIs to malfunction on these devices since the fwnode pointer was null. Fix this. Signed-off-by: Robert Hancock <hancock@sedsystems.ca> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/mfd/mfd-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index c57e407020f1..5c8ed2150c8b 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -179,6 +179,7 @@ static int mfd_add_device(struct device *parent, int id,
for_each_child_of_node(parent->of_node, np) {
if (of_device_is_compatible(np, cell->of_compatible)) {
pdev->dev.of_node = np;
+ pdev->dev.fwnode = &np->fwnode;
break;
}
}