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

mmc: sdhci: 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.

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
4ee14ec6 990b2993

+2 -18
+2 -18
drivers/mmc/host/sdhci.c
··· 2556 2556 2557 2557 int sdhci_suspend_host(struct sdhci_host *host) 2558 2558 { 2559 - int ret; 2560 - 2561 2559 if (host->ops->platform_suspend) 2562 2560 host->ops->platform_suspend(host); 2563 2561 ··· 2567 2569 host->flags &= ~SDHCI_NEEDS_RETUNING; 2568 2570 } 2569 2571 2570 - ret = mmc_suspend_host(host->mmc); 2571 - if (ret) { 2572 - if (host->flags & SDHCI_USING_RETUNING_TIMER) { 2573 - host->flags |= SDHCI_NEEDS_RETUNING; 2574 - mod_timer(&host->tuning_timer, jiffies + 2575 - host->tuning_count * HZ); 2576 - } 2577 - 2578 - sdhci_enable_card_detection(host); 2579 - 2580 - return ret; 2581 - } 2582 - 2583 2572 if (!device_may_wakeup(mmc_dev(host->mmc))) { 2584 2573 sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK); 2585 2574 free_irq(host->irq, host); ··· 2574 2589 sdhci_enable_irq_wakeups(host); 2575 2590 enable_irq_wake(host->irq); 2576 2591 } 2577 - return ret; 2592 + return 0; 2578 2593 } 2579 2594 2580 2595 EXPORT_SYMBOL_GPL(sdhci_suspend_host); 2581 2596 2582 2597 int sdhci_resume_host(struct sdhci_host *host) 2583 2598 { 2584 - int ret; 2599 + int ret = 0; 2585 2600 2586 2601 if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { 2587 2602 if (host->ops->enable_dma) ··· 2610 2625 mmiowb(); 2611 2626 } 2612 2627 2613 - ret = mmc_resume_host(host->mmc); 2614 2628 sdhci_enable_card_detection(host); 2615 2629 2616 2630 if (host->ops->platform_resume)