Skip to content

Commit c59cce7

Browse files
l1kgregkh
authored andcommitted
PM / runtime: Update links_count also if !CONFIG_SRCU
commit 433986c upstream. Commit baa8809 (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: baa8809 (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>
1 parent 2efd067 commit c59cce7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/base/core.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,9 @@ static void __device_link_del(struct device_link *link)
313313
dev_info(link->consumer, "Dropping the link to %s\n",
314314
dev_name(link->supplier));
315315

316+
if (link->flags & DL_FLAG_PM_RUNTIME)
317+
pm_runtime_drop_link(link->consumer);
318+
316319
list_del(&link->s_node);
317320
list_del(&link->c_node);
318321
device_link_free(link);

0 commit comments

Comments
 (0)