mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuah Khan <shuah.kh@samsung.com>
To: manuel.lauss@gmail.com, cjb@laptop.org
Cc: Shuah Khan <shuah.kh@samsung.com>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	shuahkhan@gmail.com
Subject: [PATCH] mmc:au1xmmc change driver to use dev_pm_ops infrastructure
Date: Sat, 10 Aug 2013 09:20:47 -0600	[thread overview]
Message-ID: <1376148055-2539-2-git-send-email-shuah.kh@samsung.com> (raw)
In-Reply-To: <1376148055-2539-1-git-send-email-shuah.kh@samsung.com>

Change au1xmmc platform driver to register pm ops using dev_pm_ops instead of
legacy pm_ops infrastructure.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
---
 drivers/mmc/host/au1xmmc.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index df9becd..0bafd7f 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -1154,11 +1154,12 @@ static int au1xmmc_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
-static int au1xmmc_suspend(struct platform_device *pdev, pm_message_t state)
+static int au1xmmc_suspend(struct device *dev)
 {
-	struct au1xmmc_host *host = platform_get_drvdata(pdev);
+	struct au1xmmc_host *host;
 	int ret;
 
+	host = platform_get_drvdata(to_platform_device(dev));
 	ret = mmc_suspend_host(host->mmc);
 	if (ret)
 		return ret;
@@ -1172,10 +1173,11 @@ static int au1xmmc_suspend(struct platform_device *pdev, pm_message_t state)
 	return 0;
 }
 
-static int au1xmmc_resume(struct platform_device *pdev)
+static int au1xmmc_resume(struct device *dev)
 {
-	struct au1xmmc_host *host = platform_get_drvdata(pdev);
+	struct au1xmmc_host *host;
 
+	host = platform_get_drvdata(to_platform_device(dev));
 	au1xmmc_reset_controller(host);
 
 	return mmc_resume_host(host->mmc);
@@ -1185,14 +1187,15 @@ static int au1xmmc_resume(struct platform_device *pdev)
 #define au1xmmc_resume NULL
 #endif
 
+static SIMPLE_DEV_PM_OPS(au1xmmc_dev_pm_ops, au1xmmc_suspend, au1xmmc_resume);
+
 static struct platform_driver au1xmmc_driver = {
 	.probe         = au1xmmc_probe,
 	.remove        = au1xmmc_remove,
-	.suspend       = au1xmmc_suspend,
-	.resume        = au1xmmc_resume,
 	.driver        = {
 		.name  = DRIVER_NAME,
 		.owner = THIS_MODULE,
+		.pm    = &au1xmmc_dev_pm_ops,
 	},
 };
 
-- 
1.7.10.4


  reply	other threads:[~2013-08-10 15:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-10 15:20 [PATCH] isa: Change " Shuah Khan
2013-08-10 15:20 ` Shuah Khan [this message]
2013-08-10 15:20 ` [PATCH] mmc:bfin_sdh change " Shuah Khan
2013-08-12  2:33   ` Zhang, Sonic
2013-08-10 15:20 ` [PATCH] mmc:bfin_sdh fix build warning in sdh_dma_irq() Shuah Khan
2013-08-12  2:32   ` Zhang, Sonic
2013-08-10 15:20 ` [PATCH] mmc:cb710_mmc change driver to use dev_pm_ops infrastructure Shuah Khan
2013-08-10 15:20 ` [PATCH] mmc:msmsdcc " Shuah Khan
2013-08-10 15:20 ` [PATCH] mmc:mvsdio " Shuah Khan
2013-08-10 15:20 ` [PATCH] mmc:rtsx_pci_sdmmc " Shuah Khan
2013-08-10 15:20 ` [PATCH] mmc:tmio_mmc " Shuah Khan
2013-08-26  8:48   ` Guennadi Liakhovetski
2013-08-10 18:52 ` [PATCH] isa: Change " Greg KH
2013-08-12 17:02   ` Shuah Khan

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=1376148055-2539-2-git-send-email-shuah.kh@samsung.com \
    --to=shuah.kh@samsung.com \
    --cc=cjb@laptop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=manuel.lauss@gmail.com \
    --cc=shuahkhan@gmail.com \
    /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

all inboxes | Powered by JetHome®