aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-27 21:41:06 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-27 21:41:06 +0200
commit33cbfe54499338af08ab906a99afac247ea533f6 (patch)
treea2af0661254396449942ca00e9f770d073d39db7 /drivers/base/core.c
parentRevert "of/platform: Add functional dependency link from DT bindings" (diff)
downloadlinux-dev-33cbfe54499338af08ab906a99afac247ea533f6.tar.xz
linux-dev-33cbfe54499338af08ab906a99afac247ea533f6.zip
Revert "driver core: Add edit_links() callback for drivers"
This reverts commit 134b23eec9e3a3c795a6ceb0efe2fa63e87983b2. Based on a lot of email and in-person discussions, this patch series is being reworked to address a number of issues that were pointed out that needed to be taken care of before it should be merged. It will be resubmitted with those changes hopefully soon. Cc: Frank Rowand <frowand.list@gmail.com> Cc: Saravana Kannan <saravanak@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index de775c7a4d7c..605905de0cca 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -440,19 +440,6 @@ static void device_link_wait_for_supplier(struct device *consumer)
}
/**
- * device_link_remove_from_wfs - Unmark device as waiting for supplier
- * @consumer: Consumer device
- *
- * Unmark the consumer device as waiting for suppliers to become available.
- */
-void device_link_remove_from_wfs(struct device *consumer)
-{
- mutex_lock(&wfs_lock);
- list_del_init(&consumer->links.needs_suppliers);
- mutex_unlock(&wfs_lock);
-}
-
-/**
* device_link_check_waiting_consumers - Try to unmark waiting consumers
*
* Loops through all consumers waiting on suppliers and tries to add all their
@@ -469,19 +456,12 @@ void device_link_remove_from_wfs(struct device *consumer)
static void device_link_check_waiting_consumers(void)
{
struct device *dev, *tmp;
- int ret;
mutex_lock(&wfs_lock);
list_for_each_entry_safe(dev, tmp, &wait_for_suppliers,
- links.needs_suppliers) {
- ret = 0;
- if (dev->has_edit_links)
- ret = driver_edit_links(dev);
- else if (dev->bus->add_links)
- ret = dev->bus->add_links(dev);
- if (!ret)
+ links.needs_suppliers)
+ if (!dev->bus->add_links(dev))
list_del_init(&dev->links.needs_suppliers);
- }
mutex_unlock(&wfs_lock);
}