[libata] PM code cleanup for ata port
authorAaron Lu <aaron.lu@intel.com>
Fri, 25 Jan 2013 06:32:25 +0000 (14:32 +0800)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 25 Jan 2013 20:33:54 +0000 (15:33 -0500)
commitf5e6d0d0eb819cbe1a68b9561c8e83fbd1a6d13a
tree4454dd91812f527f8989303d7845d346c22e6ff0
parenta7ff60dbe0858496531c75b1544666c099a2b200
[libata] PM code cleanup for ata port

For system freeze, if the port is already runtime suspended, leave it
alone and just return. The port will be resumed on thaw before it will
be used.

And since we will call get_noresume for every device during prepare
phase, and the port is resumed during thaw phase, it can't be in runtime
suspended state during the poweroff phase. So remove the
runtime_suspended check in poweroff callback.

And for all suspend(freeze/suspend/poweroff/etc.), there is no need to
touch the device, so set no_autopsy and no_recovery for them all.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c