aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-09-25 03:54:16 -0400
committerChris Ball <cjb@laptop.org>2013-10-30 20:26:33 -0400
commit914af7c2e58f49c3f5940030cfc30c6693069934 (patch)
treefb734e0947d7b381ff46d99bc30f29a44393c331
parentbbd43682eb12dab2ff4addfca04c32043dfde026 (diff)
mmc: atmel-mci: Remove redundant suspend and resume callbacks
Suspend and resume of cards are handled by the protocol layer and consequently the mmc_suspend|resume_host APIs are marked as deprecated. While moving away from using the deprecated APIs, there are nothing left to be done for the suspend and resume callbacks, so remove them. Cc: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/host/atmel-mci.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 92c18779d47e..2cbb4516d353 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -255,7 +255,6 @@ struct atmel_mci_slot {
255#define ATMCI_CARD_PRESENT 0 255#define ATMCI_CARD_PRESENT 0
256#define ATMCI_CARD_NEED_INIT 1 256#define ATMCI_CARD_NEED_INIT 1
257#define ATMCI_SHUTDOWN 2 257#define ATMCI_SHUTDOWN 2
258#define ATMCI_SUSPENDED 3
259 258
260 int detect_pin; 259 int detect_pin;
261 int wp_pin; 260 int wp_pin;
@@ -2529,70 +2528,10 @@ static int __exit atmci_remove(struct platform_device *pdev)
2529 return 0; 2528 return 0;
2530} 2529}
2531 2530
2532#ifdef CONFIG_PM_SLEEP
2533static int atmci_suspend(struct device *dev)
2534{
2535 struct atmel_mci *host = dev_get_drvdata(dev);
2536 int i;
2537
2538 for (i = 0; i < ATMCI_MAX_NR_SLOTS; i++) {
2539 struct atmel_mci_slot *slot = host->slot[i];
2540 int ret;
2541
2542 if (!slot)
2543 continue;
2544 ret = mmc_suspend_host(slot->mmc);
2545 if (ret < 0) {
2546 while (--i >= 0) {
2547 slot = host->slot[i];
2548 if (slot
2549 && test_bit(ATMCI_SUSPENDED, &slot->flags)) {
2550 mmc_resume_host(host->slot[i]->mmc);
2551 clear_bit(ATMCI_SUSPENDED, &slot->flags);
2552 }
2553 }
2554 return ret;
2555 } else {
2556 set_bit(ATMCI_SUSPENDED, &slot->flags);
2557 }
2558 }
2559
2560 return 0;
2561}
2562
2563static int atmci_resume(struct device *dev)
2564{
2565 struct atmel_mci *host = dev_get_drvdata(dev);
2566 int i;
2567 int ret = 0;
2568
2569 for (i = 0; i < ATMCI_MAX_NR_SLOTS; i++) {
2570 struct atmel_mci_slot *slot = host->slot[i];
2571 int err;
2572
2573 slot = host->slot[i];
2574 if (!slot)
2575 continue;
2576 if (!test_bit(ATMCI_SUSPENDED, &slot->flags))
2577 continue;
2578 err = mmc_resume_host(slot->mmc);
2579 if (err < 0)
2580 ret = err;
2581 else
2582 clear_bit(ATMCI_SUSPENDED, &slot->flags);
2583 }
2584
2585 return ret;
2586}
2587#endif
2588
2589static SIMPLE_DEV_PM_OPS(atmci_pm, atmci_suspend, atmci_resume);
2590
2591static struct platform_driver atmci_driver = { 2531static struct platform_driver atmci_driver = {
2592 .remove = __exit_p(atmci_remove), 2532 .remove = __exit_p(atmci_remove),
2593 .driver = { 2533 .driver = {
2594 .name = "atmel_mci", 2534 .name = "atmel_mci",
2595 .pm = &atmci_pm,
2596 .of_match_table = of_match_ptr(atmci_dt_ids), 2535 .of_match_table = of_match_ptr(atmci_dt_ids),
2597 }, 2536 },
2598}; 2537};