summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2018-02-10 19:13:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-22 15:42:20 +0100
commitc59cce7943dff0fbafcaa4e71149ee1da879d03f (patch)
tree278a7e8b0fd8e340c3923b90102c09ed5afce832 /drivers/base
parent2efd067aa4ef25386d4abbe2fe9b2c7f22cd9302 (diff)
PM / runtime: Update links_count also if !CONFIG_SRCU
commit 433986c2c265d106d6a8e88006e0131fefc92b7b upstream. Commit baa8809f6097 (PM / runtime: Optimize the use of device links) added an invocation of pm_runtime_drop_link() to __device_link_del(). However there are two variants of that function, one for CONFIG_SRCU and another for !CONFIG_SRCU, and the commit only modified the former. Fixes: baa8809f6097 (PM / runtime: Optimize the use of device links) Cc: v4.10+ <stable@vger.kernel.org> # v4.10+ Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 12ebd055724c..c8501cdb95f4 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -313,6 +313,9 @@ static void __device_link_del(struct device_link *link)
dev_info(link->consumer, "Dropping the link to %s\n",
dev_name(link->supplier));
+ if (link->flags & DL_FLAG_PM_RUNTIME)
+ pm_runtime_drop_link(link->consumer);
+
list_del(&link->s_node);
list_del(&link->c_node);
device_link_free(link);