summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2012-11-09 08:27:54 +0100
committerJames Bottomley <JBottomley@Parallels.com>2012-11-30 10:26:48 +0100
commit80d2fd48cca2a0de806c3130551744a04ad5b80b (patch)
tree93fd73939dde64143a8f381dba5eea72b486d684 /mm
parent[SCSI] Revert "[SCSI] runtime resume parent for child's system-resume" (diff)
downloadlinux-80d2fd48cca2a0de806c3130551744a04ad5b80b.tar.xz
linux-80d2fd48cca2a0de806c3130551744a04ad5b80b.zip
[SCSI] scsi_pm: use callbacks from dev_pm_ops for scsi devices
Use of pm_message_t is deprecated and device driver is not supposed to use that. This patch migrates the SCSI bus level pm callbacks to call device's pm callbacks defined in its driver's dev_pm_ops. This is achieved by finding out which device pm callback should be used in bus callback function, and then pass that callback function pointer as a param to the scsi_bus_{suspend,resume}_common routine, which will further pass that callback to scsi_dev_type_{suspend,resume} after proper handling. The special case for freeze in scsi_bus_suspend_common is not necessary since there is no high level SCSI driver has implemented freeze, so no need to runtime resume the device if it is in runtime suspended state for system freeze, just return like the system suspend/hibernate case. Since only sd has implemented drv->suspend/drv->resume, and I'll update sd driver to use the new callbacks in the following patch, there is no need to fallback to call drv->suspend/drv->resume if dev_pm_ops is NULL. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions