]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PCI/PM: Avoid using device_may_wakeup() for runtime PM
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Jun 2017 12:58:11 +0000 (14:58 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 30 Jun 2017 16:15:12 +0000 (11:15 -0500)
commit666ff6f83e1db6ed847abf44eb5e3402d82b9350
treedec4eb16de07ce72cb5d0119e6cdeebe0cc7bd4b
parent0bf3730bbc41f155543fa63becb4ff436d6a00a9
PCI/PM: Avoid using device_may_wakeup() for runtime PM

pci_target_state() calls device_may_wakeup() which checks whether or not
the device may wake up the system from sleep states, but pci_target_state()
is used for runtime PM too.

Since runtime PM is expected to always enable remote wakeup if possible,
modify pci_target_state() to take additional argument indicating whether or
not it should look for a state from which the device can signal wakeup and
pass either the return value of device_can_wakeup(), or "false" (if the
device itself is not wakeup-capable) to it from the code related to runtime
PM.

While at it, fix the comment in pci_dev_run_wake() which is not about sleep
states.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pci/pci.c