]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PM: runtime: Drop pm_runtime_clean_up_links()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 21 Oct 2020 19:13:10 +0000 (21:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Nov 2020 11:39:10 +0000 (12:39 +0100)
commit345b6e7348fa0afb83da904e5633642d5fdf3144
tree81118d8c6967f5cc06430a4f609e86a359d7f059
parent4163d25d6e9852806c9c86776d2db7fb0c3ee8ca
PM: runtime: Drop pm_runtime_clean_up_links()

commit d6e36668598154820177bfd78c1621d8e6c580a2 upstream.

After commit d12544fb2aa9 ("PM: runtime: Remove link state checks in
rpm_get/put_supplier()") nothing prevents the consumer device's
runtime PM from acquiring additional references to the supplier
device after pm_runtime_clean_up_links() has run (or even while it
is running), so calling this function from __device_release_driver()
may be pointless (or even harmful).

Moreover, it ignores stateless device links, so the runtime PM
handling of managed and stateless device links is inconsistent
because of it, so better get rid of it entirely.

Fixes: d12544fb2aa9 ("PM: runtime: Remove link state checks in rpm_get/put_supplier()")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 5.1+ <stable@vger.kernel.org> # 5.1+
Tested-by: Xiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/dd.c
drivers/base/power/runtime.c
include/linux/pm_runtime.h