Commit 09b055cf authored by Damien Le Moal's avatar Damien Le Moal

ata: libata-core: Remove ata_port_resume_async()

Remove ata_port_resume_async() and replace it with a modified
ata_port_resume() taking an additional bool argument indicating if
ata EH resume operation should be executed synchronously or
asynchronously. With this change, the variable ata_port_resume_ehi is
not longer necessary and its value (ATA_EHI_XXX flags) passed directly
to ata_port_request_pm().
Signed-off-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Tested-by: default avatarChia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 6702255d
...@@ -5219,22 +5219,17 @@ static int ata_port_pm_poweroff(struct device *dev) ...@@ -5219,22 +5219,17 @@ static int ata_port_pm_poweroff(struct device *dev)
return 0; return 0;
} }
static const unsigned int ata_port_resume_ehi = ATA_EHI_NO_AUTOPSY static void ata_port_resume(struct ata_port *ap, pm_message_t mesg,
| ATA_EHI_QUIET; bool async)
static void ata_port_resume(struct ata_port *ap, pm_message_t mesg)
{ {
ata_port_request_pm(ap, mesg, ATA_EH_RESET, ata_port_resume_ehi, false); ata_port_request_pm(ap, mesg, ATA_EH_RESET,
} ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET,
async);
static void ata_port_resume_async(struct ata_port *ap, pm_message_t mesg)
{
ata_port_request_pm(ap, mesg, ATA_EH_RESET, ata_port_resume_ehi, true);
} }
static int ata_port_pm_resume(struct device *dev) static int ata_port_pm_resume(struct device *dev)
{ {
ata_port_resume_async(to_ata_port(dev), PMSG_RESUME); ata_port_resume(to_ata_port(dev), PMSG_RESUME, true);
pm_runtime_disable(dev); pm_runtime_disable(dev);
pm_runtime_set_active(dev); pm_runtime_set_active(dev);
pm_runtime_enable(dev); pm_runtime_enable(dev);
...@@ -5273,7 +5268,7 @@ static int ata_port_runtime_suspend(struct device *dev) ...@@ -5273,7 +5268,7 @@ static int ata_port_runtime_suspend(struct device *dev)
static int ata_port_runtime_resume(struct device *dev) static int ata_port_runtime_resume(struct device *dev)
{ {
ata_port_resume(to_ata_port(dev), PMSG_AUTO_RESUME); ata_port_resume(to_ata_port(dev), PMSG_AUTO_RESUME, false);
return 0; return 0;
} }
...@@ -5303,7 +5298,7 @@ EXPORT_SYMBOL_GPL(ata_sas_port_suspend); ...@@ -5303,7 +5298,7 @@ EXPORT_SYMBOL_GPL(ata_sas_port_suspend);
void ata_sas_port_resume(struct ata_port *ap) void ata_sas_port_resume(struct ata_port *ap)
{ {
ata_port_resume_async(ap, PMSG_RESUME); ata_port_resume(ap, PMSG_RESUME, true);
} }
EXPORT_SYMBOL_GPL(ata_sas_port_resume); EXPORT_SYMBOL_GPL(ata_sas_port_resume);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment