From: Robert Hancock Date: Tue, 4 Jun 2019 22:35:43 +0000 (-0600) Subject: mfd: core: Set fwnode for created devices X-Git-Tag: v4.4.187~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83cf7513ef910689faf905096324937df40bde69;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 022c9374ce8bf..215bb5eeb5acf 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c @@ -178,6 +178,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; } }