diff options
author | Saravana Kannan | 2021-02-05 14:26:38 -0800 |
---|---|---|
committer | Greg Kroah-Hartman | 2021-02-09 14:31:06 +0100 |
commit | 1753c4d1edbcf1b35e585ff76777d09434344c8f (patch) | |
tree | 53ab8329dcfb16dc70d4f8a24185330763308ae9 | |
parent | 9528e0d9c10027ae80e2aab36e30a1f730b1bbf9 (diff) |
of: property: Don't add links to absent suppliers
If driver core marks a firmware node as not a device, don't add fwnode
links where it's a supplier.
Fixes: e590474768f1 ("driver core: Set fw_devlink=on by default")
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20210205222644.2357303-3-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/of/property.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/of/property.c b/drivers/of/property.c index 8b52160adcc3..94f3f6cc7667 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1103,7 +1103,9 @@ static int of_link_to_phandle(struct device_node *con_np, * created for them. */ sup_dev = get_dev_from_fwnode(&sup_np->fwnode); - if (!sup_dev && of_node_check_flag(sup_np, OF_POPULATED)) { + if (!sup_dev && + (of_node_check_flag(sup_np, OF_POPULATED) || + sup_np->fwnode.flags & FWNODE_FLAG_NOT_DEVICE)) { pr_debug("Not linking %pOFP to %pOFP - No struct device\n", con_np, sup_np); of_node_put(sup_np); |