Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: dw_mmc: 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: Seungwon Jeon <tgih.jun@samsung.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>

authored by

Ulf Hansson and committed by
Chris Ball
1eeaadf3 5ffdeea5

-21
-21
drivers/mmc/host/dw_mmc.c
··· 2696 2696 */ 2697 2697 int dw_mci_suspend(struct dw_mci *host) 2698 2698 { 2699 - int i, ret = 0; 2700 - 2701 - for (i = 0; i < host->num_slots; i++) { 2702 - struct dw_mci_slot *slot = host->slot[i]; 2703 - if (!slot) 2704 - continue; 2705 - ret = mmc_suspend_host(slot->mmc); 2706 - if (ret < 0) { 2707 - while (--i >= 0) { 2708 - slot = host->slot[i]; 2709 - if (slot) 2710 - mmc_resume_host(host->slot[i]->mmc); 2711 - } 2712 - return ret; 2713 - } 2714 - } 2715 - 2716 2699 if (host->vmmc) 2717 2700 regulator_disable(host->vmmc); 2718 2701 ··· 2748 2765 dw_mci_set_ios(slot->mmc, &slot->mmc->ios); 2749 2766 dw_mci_setup_bus(slot, true); 2750 2767 } 2751 - 2752 - ret = mmc_resume_host(host->slot[i]->mmc); 2753 - if (ret < 0) 2754 - return ret; 2755 2768 } 2756 2769 return 0; 2757 2770 }