summaryrefslogtreecommitdiff
path: root/drivers/firmware
diff options
context:
space:
mode:
authorSaravana Kannan <saravanak@google.com>2020-11-21 05:02:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-09 21:13:03 +0300
commite82a840cb1c1c83d01a9b81bb63b6cf1c09239d7 (patch)
tree2554ab6aa6ea5706487164ecd2dc3cfe75b405ad /drivers/firmware
parent8a06d1ea061739dd2e60aff3d64a58892e4031cf (diff)
downloadlinux-e82a840cb1c1c83d01a9b81bb63b6cf1c09239d7.tar.xz
efi: Update implementation of add_links() to create fwnode links
The semantics of add_links() has changed from creating device link between devices to creating fwnode links between fwnodes. So, update the implementation of add_links() to match the new semantics. Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20201121020232.908850-16-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/efi/efi-init.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/firmware/efi/efi-init.c b/drivers/firmware/efi/efi-init.c
index 65bb97c391b0..c0c3d4c3837a 100644
--- a/drivers/firmware/efi/efi-init.c
+++ b/drivers/firmware/efi/efi-init.c
@@ -320,7 +320,6 @@ static int efifb_add_links(struct fwnode_handle *fwnode,
struct device *dev)
{
struct device_node *sup_np;
- struct device *sup_dev;
sup_np = find_pci_overlap_node();
@@ -331,27 +330,9 @@ static int efifb_add_links(struct fwnode_handle *fwnode,
if (!sup_np)
return 0;
- sup_dev = get_dev_from_fwnode(&sup_np->fwnode);
+ fwnode_link_add(fwnode, of_fwnode_handle(sup_np));
of_node_put(sup_np);
- /*
- * Return -ENODEV if the PCI graphics controller device hasn't been
- * registered yet. This ensures that efifb isn't allowed to probe
- * and this function is retried again when new devices are
- * registered.
- */
- if (!sup_dev)
- return -ENODEV;
-
- /*
- * If this fails, retrying this function at a later point won't
- * change anything. So, don't return an error after this.
- */
- if (!device_link_add(dev, sup_dev, fw_devlink_get_flags()))
- dev_warn(dev, "device_link_add() failed\n");
-
- put_device(sup_dev);
-
return 0;
}