lkml.org 
[lkml]   [2019]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.2 097/215] mfd: core: Set fwnode for created devices
    Date
    [ 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>
    ---
    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 dbf684c4ebfb..23276a80e3b4 100644
    --- a/drivers/mfd/mfd-core.c
    +++ b/drivers/mfd/mfd-core.c
    @@ -175,6 +175,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;
    }
    }
    --
    2.20.1


    \
     
     \ /
      Last update: 2019-07-29 22:10    [W:4.044 / U:0.492 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site