From: ulf.hansson@stericsson.com (Ulf Hansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/14] mmc: mmci: Change from using legacy suspend
Date: Mon, 5 Dec 2011 18:35:55 +0100 [thread overview]
Message-ID: <1323106560-5218-10-git-send-email-ulf.hansson@stericsson.com> (raw)
In-Reply-To: <1323106560-5218-1-git-send-email-ulf.hansson@stericsson.com>
This patch switch from using the legacy suspend/resume
to the new way of registering PM callbacks. No functional
change is done.
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
---
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 62ad649..4560b20 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1455,10 +1455,11 @@ static int __devexit mmci_remove(struct amba_device *dev)
return 0;
}
-#ifdef CONFIG_PM
-static int mmci_suspend(struct amba_device *dev, pm_message_t state)
+#ifdef CONFIG_SUSPEND
+static int mmci_suspend(struct device *dev)
{
- struct mmc_host *mmc = amba_get_drvdata(dev);
+ struct amba_device *adev = to_amba_device(dev);
+ struct mmc_host *mmc = amba_get_drvdata(adev);
int ret = 0;
if (mmc) {
@@ -1472,9 +1473,10 @@ static int mmci_suspend(struct amba_device *dev, pm_message_t state)
return ret;
}
-static int mmci_resume(struct amba_device *dev)
+static int mmci_resume(struct device *dev)
{
- struct mmc_host *mmc = amba_get_drvdata(dev);
+ struct amba_device *adev = to_amba_device(dev);
+ struct mmc_host *mmc = amba_get_drvdata(adev);
int ret = 0;
if (mmc) {
@@ -1487,11 +1489,12 @@ static int mmci_resume(struct amba_device *dev)
return ret;
}
-#else
-#define mmci_suspend NULL
-#define mmci_resume NULL
#endif
+static const struct dev_pm_ops mmci_dev_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(mmci_suspend, mmci_resume)
+};
+
static struct amba_id mmci_ids[] = {
{
.id = 0x00041180,
@@ -1535,11 +1538,10 @@ static struct amba_id mmci_ids[] = {
static struct amba_driver mmci_driver = {
.drv = {
.name = DRIVER_NAME,
+ .pm = &mmci_dev_pm_ops,
},
.probe = mmci_probe,
.remove = __devexit_p(mmci_remove),
- .suspend = mmci_suspend,
- .resume = mmci_resume,
.id_table = mmci_ids,
};
--
1.7.5.4
next prev parent reply other threads:[~2011-12-05 17:35 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 17:35 [PATCH 00/14] mmc: mmci: Improved PM support, cleanup and bugfixes Ulf Hansson
2011-12-05 17:35 ` [PATCH 01/14] mmc: mmci: Support MMC_PM_KEEP_POWER Ulf Hansson
2011-12-05 17:35 ` [PATCH 02/14] mmc: mmci: Fixup handling of MCI_STARTBITERR Ulf Hansson
2011-12-18 23:15 ` Russell King - ARM Linux
2011-12-19 8:59 ` Ulf Hansson
2011-12-05 17:35 ` [PATCH 03/14] mmc: mmci: Increase max_segs from 16 to 128 Ulf Hansson
2011-12-05 17:35 ` [PATCH 04/14] mmc: mmci: Do not release spinlock in request_end Ulf Hansson
2011-12-05 17:35 ` [PATCH 05/14] mmc: mmci: Put power register deviations in variant data Ulf Hansson
2011-12-05 17:35 ` [PATCH 06/14] mmc: mmci: Provide option to configure bus signal direction Ulf Hansson
2011-12-05 17:35 ` [PATCH 07/14] mmc: mmci: Change vdd_handler to a generic ios_handler Ulf Hansson
2011-12-05 17:35 ` [PATCH 08/14] mmc: mmci: Fixup error handling for dma Ulf Hansson
2011-12-18 23:16 ` Russell King - ARM Linux
2011-12-19 8:59 ` Ulf Hansson
2011-12-05 17:35 ` Ulf Hansson [this message]
2011-12-05 17:35 ` [PATCH 10/14] mmc: mmci: Cache MMCICLOCK and MMCIPOWER register Ulf Hansson
2012-01-08 10:25 ` Russell King - ARM Linux
2012-01-09 11:46 ` Ulf Hansson
2012-01-09 15:12 ` Ulf Hansson
2011-12-05 17:35 ` [PATCH 11/14] mmc: mmci: Fixup use of runtime PM and use autosuspend Ulf Hansson
2011-12-05 17:35 ` [PATCH 12/14] mmc: mmci: Decrease current consumption in suspend Ulf Hansson
2012-01-08 10:38 ` Russell King - ARM Linux
2012-01-09 14:12 ` Ulf Hansson
2011-12-05 17:35 ` [PATCH 13/14] mmc: mmci: Implement PM runtime callbacks to save power Ulf Hansson
2011-12-05 17:36 ` [PATCH 14/14] mmc: mmci: Use ios_handler " Ulf Hansson
2011-12-07 12:06 ` [PATCH 00/14] mmc: mmci: Improved PM support, cleanup and bugfixes Linus Walleij
2011-12-13 16:17 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1323106560-5218-10-git-send-email-ulf.hansson@stericsson.com \
--to=ulf.hansson@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).