mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
UPSTREAM: driver core: Skip unnecessary work when device doesn't have sync_state()
A bunch of busy work is done for devices that don't have sync_state()
support. Stop doing the busy work.
Signed-off-by: Saravana Kannan <saravanak@google.com>
Link: https://lore.kernel.org/r/20200221080510.197337-4-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 77036165d8bcf7c7b2a2df28a601ec2c52bb172d)
Bug: 151865289
Change-Id: Id513185be93c036150ffd7156104f898fec70c11
Git-commit: a27d26af7d
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
This commit is contained in:
parent
0d3cca0c7d
commit
e0d015a1af
1 changed files with 3 additions and 1 deletions
|
|
@ -722,6 +722,8 @@ static void __device_links_queue_sync_state(struct device *dev,
|
|||
{
|
||||
struct device_link *link;
|
||||
|
||||
if (!dev_has_sync_state(dev))
|
||||
return;
|
||||
if (dev->state_synced)
|
||||
return;
|
||||
|
||||
|
|
@ -823,7 +825,7 @@ late_initcall(sync_state_resume_initcall);
|
|||
|
||||
static void __device_links_supplier_defer_sync(struct device *sup)
|
||||
{
|
||||
if (list_empty(&sup->links.defer_sync))
|
||||
if (list_empty(&sup->links.defer_sync) && dev_has_sync_state(sup))
|
||||
list_add_tail(&sup->links.defer_sync, &deferred_sync);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue