diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2013-09-25 08:15:24 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-10-30 20:28:19 -0400 |
commit | 4ee14ec65810702a95d195757d307c41ecfd1c71 (patch) | |
tree | 4b0bd8d0293af2de1ae4a3fcc319e7a58e20ce8c /drivers/mmc | |
parent | 990b2993d11489cb6ee19f948d203afb35871071 (diff) |
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index a21a71056dd0..6785fb1dc5c6 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -2556,8 +2556,6 @@ EXPORT_SYMBOL_GPL(sdhci_disable_irq_wakeups); | |||
2556 | 2556 | ||
2557 | int sdhci_suspend_host(struct sdhci_host *host) | 2557 | int sdhci_suspend_host(struct sdhci_host *host) |
2558 | { | 2558 | { |
2559 | int ret; | ||
2560 | |||
2561 | if (host->ops->platform_suspend) | 2559 | if (host->ops->platform_suspend) |
2562 | host->ops->platform_suspend(host); | 2560 | host->ops->platform_suspend(host); |
2563 | 2561 | ||
@@ -2569,19 +2567,6 @@ int sdhci_suspend_host(struct sdhci_host *host) | |||
2569 | host->flags &= ~SDHCI_NEEDS_RETUNING; | 2567 | host->flags &= ~SDHCI_NEEDS_RETUNING; |
2570 | } | 2568 | } |
2571 | 2569 | ||
2572 | ret = mmc_suspend_host(host->mmc); | ||
2573 | if (ret) { | ||
2574 | if (host->flags & SDHCI_USING_RETUNING_TIMER) { | ||
2575 | host->flags |= SDHCI_NEEDS_RETUNING; | ||
2576 | mod_timer(&host->tuning_timer, jiffies + | ||
2577 | host->tuning_count * HZ); | ||
2578 | } | ||
2579 | |||
2580 | sdhci_enable_card_detection(host); | ||
2581 | |||
2582 | return ret; | ||
2583 | } | ||
2584 | |||
2585 | if (!device_may_wakeup(mmc_dev(host->mmc))) { | 2570 | if (!device_may_wakeup(mmc_dev(host->mmc))) { |
2586 | sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK); | 2571 | sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK); |
2587 | free_irq(host->irq, host); | 2572 | free_irq(host->irq, host); |
@@ -2589,14 +2574,14 @@ int sdhci_suspend_host(struct sdhci_host *host) | |||
2589 | sdhci_enable_irq_wakeups(host); | 2574 | sdhci_enable_irq_wakeups(host); |
2590 | enable_irq_wake(host->irq); | 2575 | enable_irq_wake(host->irq); |
2591 | } | 2576 | } |
2592 | return ret; | 2577 | return 0; |
2593 | } | 2578 | } |
2594 | 2579 | ||
2595 | EXPORT_SYMBOL_GPL(sdhci_suspend_host); | 2580 | EXPORT_SYMBOL_GPL(sdhci_suspend_host); |
2596 | 2581 | ||
2597 | int sdhci_resume_host(struct sdhci_host *host) | 2582 | int sdhci_resume_host(struct sdhci_host *host) |
2598 | { | 2583 | { |
2599 | int ret; | 2584 | int ret = 0; |
2600 | 2585 | ||
2601 | if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { | 2586 | if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { |
2602 | if (host->ops->enable_dma) | 2587 | if (host->ops->enable_dma) |
@@ -2625,7 +2610,6 @@ int sdhci_resume_host(struct sdhci_host *host) | |||
2625 | mmiowb(); | 2610 | mmiowb(); |
2626 | } | 2611 | } |
2627 | 2612 | ||
2628 | ret = mmc_resume_host(host->mmc); | ||
2629 | sdhci_enable_card_detection(host); | 2613 | sdhci_enable_card_detection(host); |
2630 | 2614 | ||
2631 | if (host->ops->platform_resume) | 2615 | if (host->ops->platform_resume) |