diff options
author | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-12-13 10:59:34 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-19 19:00:57 -0500 |
commit | 48fa700388bec2ba79e9c8cc087f39c800a6fff5 (patch) | |
tree | 2863d3ac7e39093d63b88364753e696b3e76a516 /drivers/mmc/host/mmci.c | |
parent | bc521818e28042bb6018d91c353d24fb01ccb162 (diff) |
ARM: 7221/1: mmc: mmci: Change from using legacy suspend
This patch switch from using the legacy suspend/resume
to the new way of registering PM callbacks. No functional
change is done.
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r-- | drivers/mmc/host/mmci.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 0af1507d15c0..544995b3cb95 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -1456,10 +1456,11 @@ static int __devexit mmci_remove(struct amba_device *dev) | |||
1456 | return 0; | 1456 | return 0; |
1457 | } | 1457 | } |
1458 | 1458 | ||
1459 | #ifdef CONFIG_PM | 1459 | #ifdef CONFIG_SUSPEND |
1460 | static int mmci_suspend(struct amba_device *dev, pm_message_t state) | 1460 | static int mmci_suspend(struct device *dev) |
1461 | { | 1461 | { |
1462 | struct mmc_host *mmc = amba_get_drvdata(dev); | 1462 | struct amba_device *adev = to_amba_device(dev); |
1463 | struct mmc_host *mmc = amba_get_drvdata(adev); | ||
1463 | int ret = 0; | 1464 | int ret = 0; |
1464 | 1465 | ||
1465 | if (mmc) { | 1466 | if (mmc) { |
@@ -1473,9 +1474,10 @@ static int mmci_suspend(struct amba_device *dev, pm_message_t state) | |||
1473 | return ret; | 1474 | return ret; |
1474 | } | 1475 | } |
1475 | 1476 | ||
1476 | static int mmci_resume(struct amba_device *dev) | 1477 | static int mmci_resume(struct device *dev) |
1477 | { | 1478 | { |
1478 | struct mmc_host *mmc = amba_get_drvdata(dev); | 1479 | struct amba_device *adev = to_amba_device(dev); |
1480 | struct mmc_host *mmc = amba_get_drvdata(adev); | ||
1479 | int ret = 0; | 1481 | int ret = 0; |
1480 | 1482 | ||
1481 | if (mmc) { | 1483 | if (mmc) { |
@@ -1488,11 +1490,12 @@ static int mmci_resume(struct amba_device *dev) | |||
1488 | 1490 | ||
1489 | return ret; | 1491 | return ret; |
1490 | } | 1492 | } |
1491 | #else | ||
1492 | #define mmci_suspend NULL | ||
1493 | #define mmci_resume NULL | ||
1494 | #endif | 1493 | #endif |
1495 | 1494 | ||
1495 | static const struct dev_pm_ops mmci_dev_pm_ops = { | ||
1496 | SET_SYSTEM_SLEEP_PM_OPS(mmci_suspend, mmci_resume) | ||
1497 | }; | ||
1498 | |||
1496 | static struct amba_id mmci_ids[] = { | 1499 | static struct amba_id mmci_ids[] = { |
1497 | { | 1500 | { |
1498 | .id = 0x00041180, | 1501 | .id = 0x00041180, |
@@ -1538,11 +1541,10 @@ MODULE_DEVICE_TABLE(amba, mmci_ids); | |||
1538 | static struct amba_driver mmci_driver = { | 1541 | static struct amba_driver mmci_driver = { |
1539 | .drv = { | 1542 | .drv = { |
1540 | .name = DRIVER_NAME, | 1543 | .name = DRIVER_NAME, |
1544 | .pm = &mmci_dev_pm_ops, | ||
1541 | }, | 1545 | }, |
1542 | .probe = mmci_probe, | 1546 | .probe = mmci_probe, |
1543 | .remove = __devexit_p(mmci_remove), | 1547 | .remove = __devexit_p(mmci_remove), |
1544 | .suspend = mmci_suspend, | ||
1545 | .resume = mmci_resume, | ||
1546 | .id_table = mmci_ids, | 1548 | .id_table = mmci_ids, |
1547 | }; | 1549 | }; |
1548 | 1550 | ||