2019-06-04 23:01:50

by Robert Hancock

[permalink] [raw]
Subject: [PATCH 2/2] 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 <[email protected]>
---
drivers/mfd/mfd-core.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 74bc895..228163c 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -182,6 +182,7 @@ static int mfd_add_device(struct device *parent, int id,
!strcmp(cell->of_full_name,
of_node_full_name(np)))) {
pdev->dev.of_node = np;
+ pdev->dev.fwnode = &np->fwnode;
break;
}
}
--
1.8.3.1


2019-06-05 06:33:59

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 2/2] mfd: core: Set fwnode for created devices

On Tue, 04 Jun 2019, Robert Hancock wrote:

> 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 <[email protected]>
> ---
> drivers/mfd/mfd-core.c | 1 +
> 1 file changed, 1 insertion(+)

Applied, thanks.

--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog