Commit ccad9b97 authored by Ulf Hansson's avatar Ulf Hansson Committed by Chris Ball

mmc: via-sdmmc: Move away from using deprecated APIs

Suspend and resume of cards are being handled from the protocol layer
and consequently the mmc_suspend|resume_host APIs are deprecated.

This means we can simplify the suspend|resume callbacks by removing the
use of the deprecated APIs.

Cc: Bruce Chang <brucechang@via.com.tw>
Cc: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent d62c9577
...@@ -1269,21 +1269,18 @@ static void via_init_sdc_pm(struct via_crdr_mmc_host *host) ...@@ -1269,21 +1269,18 @@ static void via_init_sdc_pm(struct via_crdr_mmc_host *host)
static int via_sd_suspend(struct pci_dev *pcidev, pm_message_t state) static int via_sd_suspend(struct pci_dev *pcidev, pm_message_t state)
{ {
struct via_crdr_mmc_host *host; struct via_crdr_mmc_host *host;
int ret = 0;
host = pci_get_drvdata(pcidev); host = pci_get_drvdata(pcidev);
via_save_pcictrlreg(host); via_save_pcictrlreg(host);
via_save_sdcreg(host); via_save_sdcreg(host);
ret = mmc_suspend_host(host->mmc);
pci_save_state(pcidev); pci_save_state(pcidev);
pci_enable_wake(pcidev, pci_choose_state(pcidev, state), 0); pci_enable_wake(pcidev, pci_choose_state(pcidev, state), 0);
pci_disable_device(pcidev); pci_disable_device(pcidev);
pci_set_power_state(pcidev, pci_choose_state(pcidev, state)); pci_set_power_state(pcidev, pci_choose_state(pcidev, state));
return ret; return 0;
} }
static int via_sd_resume(struct pci_dev *pcidev) static int via_sd_resume(struct pci_dev *pcidev)
...@@ -1316,8 +1313,6 @@ static int via_sd_resume(struct pci_dev *pcidev) ...@@ -1316,8 +1313,6 @@ static int via_sd_resume(struct pci_dev *pcidev)
via_restore_pcictrlreg(sdhost); via_restore_pcictrlreg(sdhost);
via_init_sdc_pm(sdhost); via_init_sdc_pm(sdhost);
ret = mmc_resume_host(sdhost->mmc);
return ret; return ret;
} }
......
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