mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuah Khan <shuah.kh@samsung.com>
To: nico@fluxnic.net, cjb@laptop.org,
	thomas.petazzoni@free-electrons.com, jason@lakedaemon.net,
	andrew@lunn.ch, jg1.han@samsung.com, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Shuah Khan <shuah.kh@samsung.com>, shuahkhan@gmail.com
Subject: [PATCH] mmc:mvsdio change driver to use dev_pm_ops infrastructure
Date: Sat, 10 Aug 2013 09:20:52 -0600	[thread overview]
Message-ID: <1376148055-2539-7-git-send-email-shuah.kh@samsung.com> (raw)
In-Reply-To: <1376148055-2539-1-git-send-email-shuah.kh@samsung.com>

Change mvsd 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/mvsdio.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index 4ddd83f..800a7fd 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -838,9 +838,9 @@ static int __exit mvsd_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
-static int mvsd_suspend(struct platform_device *dev, pm_message_t state)
+static int mvsd_suspend(struct device *dev)
 {
-	struct mmc_host *mmc = platform_get_drvdata(dev);
+	struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
 	int ret = 0;
 
 	if (mmc)
@@ -849,9 +849,9 @@ static int mvsd_suspend(struct platform_device *dev, pm_message_t state)
 	return ret;
 }
 
-static int mvsd_resume(struct platform_device *dev)
+static int mvsd_resume(struct device *dev)
 {
-	struct mmc_host *mmc = platform_get_drvdata(dev);
+	struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
 	int ret = 0;
 
 	if (mmc)
@@ -870,13 +870,14 @@ static const struct of_device_id mvsdio_dt_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, mvsdio_dt_ids);
 
+static SIMPLE_DEV_PM_OPS(mvsd_dev_pm_ops, mvsd_suspend, mvsd_resume);
+
 static struct platform_driver mvsd_driver = {
 	.remove		= __exit_p(mvsd_remove),
-	.suspend	= mvsd_suspend,
-	.resume		= mvsd_resume,
 	.driver		= {
 		.name	= DRIVER_NAME,
 		.of_match_table = mvsdio_dt_ids,
+		.pm = &mvsd_dev_pm_ops,
 	},
 };
 
-- 
1.7.10.4


  parent 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 ` [PATCH] mmc:au1xmmc change " Shuah Khan
2013-08-10 15:20 ` [PATCH] mmc:bfin_sdh " 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 ` Shuah Khan [this message]
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-7-git-send-email-shuah.kh@samsung.com \
    --to=shuah.kh@samsung.com \
    --cc=andrew@lunn.ch \
    --cc=cjb@laptop.org \
    --cc=jason@lakedaemon.net \
    --cc=jg1.han@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=shuahkhan@gmail.com \
    --cc=thomas.petazzoni@free-electrons.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®