aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorRobert Hancock <hancock@sedsystems.ca>2019-06-04 16:35:43 -0600
committerLee Jones <lee.jones@linaro.org>2019-07-02 12:11:31 +0100
commitc176c6d7e932662668bcaec2d763657096589d85 (patch)
tree5e822a95af2e25a6f84bbefcae3836ab0bd89c31 /drivers/mfd
parentmfd: intel-lpss: Keep device tables sorted by ID (diff)
downloadlinux-dev-c176c6d7e932662668bcaec2d763657096589d85.tar.xz
linux-dev-c176c6d7e932662668bcaec2d763657096589d85.zip
mfd: core: Set fwnode for created devices
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>
Diffstat (limited to 'drivers/mfd')
-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 1ade4c8cc91f..9ce909b821ec 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;
}
}