summaryrefslogtreecommitdiff
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-11 09:00:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-11 09:00:09 +0200
commitc8be6af9ef16cf44d690fc227a0d2dd7a526ef05 (patch)
tree805518819810a3ab4f1c53dc8d529f987abe9db8 /drivers/base/core.c
parentc78c31b374a68be79cb4a03ef5b6c187f034e903 (diff)
parent2ef96a5bb12be62ef75b5828c0aab838ebb29cb8 (diff)
Merge v5.7-rc5 into driver-core-next
We want the driver core fixes in here and this resolves a merge issue with drivers/base/dd.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index db103e32489b..c9045521596f 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -2370,6 +2370,11 @@ u32 fw_devlink_get_flags(void)
return fw_devlink_flags;
}
+static bool fw_devlink_is_permissive(void)
+{
+ return fw_devlink_flags == DL_FLAG_SYNC_STATE_ONLY;
+}
+
/**
* device_add - add device to device hierarchy.
* @dev: device.
@@ -2524,7 +2529,7 @@ int device_add(struct device *dev)
if (fw_devlink_flags && is_fwnode_dev &&
fwnode_has_op(dev->fwnode, add_links)) {
fw_ret = fwnode_call_int_op(dev->fwnode, add_links, dev);
- if (fw_ret == -ENODEV)
+ if (fw_ret == -ENODEV && !fw_devlink_is_permissive())
device_link_wait_for_mandatory_supplier(dev);
else if (fw_ret)
device_link_wait_for_optional_supplier(dev);