mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuah Khan <shuah.kh@samsung.com>
To: cjb@laptop.org, wei_wang@realsil.com.cn, sameo@linux.intel.com,
	arnd@arndb.de, jg1.han@samsung.com
Cc: Shuah Khan <shuah.kh@samsung.com>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	shuahkhan@gmail.com
Subject: [PATCH] mmc:rtsx_pci_sdmmc change driver to use dev_pm_ops infrastructure
Date: Sat, 10 Aug 2013 09:20:54 -0600	[thread overview]
Message-ID: <1376148055-2539-9-git-send-email-shuah.kh@samsung.com> (raw)
In-Reply-To: <1376148055-2539-1-git-send-email-shuah.kh@samsung.com>

Change rtsx_pci_sdmmc 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/rtsx_pci_sdmmc.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index 82a35b9..fc52f28 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -1166,9 +1166,9 @@ static const struct mmc_host_ops realtek_pci_sdmmc_ops = {
 };
 
 #ifdef CONFIG_PM
-static int rtsx_pci_sdmmc_suspend(struct platform_device *pdev,
-		pm_message_t state)
+static int rtsx_pci_sdmmc_suspend(struct device *dev)
 {
+	struct platform_device *pdev = to_platform_device(dev);
 	struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev);
 	struct mmc_host *mmc = host->mmc;
 	int err;
@@ -1182,8 +1182,9 @@ static int rtsx_pci_sdmmc_suspend(struct platform_device *pdev,
 	return 0;
 }
 
-static int rtsx_pci_sdmmc_resume(struct platform_device *pdev)
+static int rtsx_pci_sdmmc_resume(struct device *dev)
 {
+	struct platform_device *pdev = to_platform_device(dev);
 	struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev);
 	struct mmc_host *mmc = host->mmc;
 
@@ -1331,15 +1332,17 @@ static struct platform_device_id rtsx_pci_sdmmc_ids[] = {
 };
 MODULE_DEVICE_TABLE(platform, rtsx_pci_sdmmc_ids);
 
+static SIMPLE_DEV_PM_OPS(rtsx_pci_sdmmc_dev_pm_ops, rtsx_pci_sdmmc_suspend,
+			 rtsx_pci_sdmmc_resume);
+
 static struct platform_driver rtsx_pci_sdmmc_driver = {
 	.probe		= rtsx_pci_sdmmc_drv_probe,
 	.remove		= rtsx_pci_sdmmc_drv_remove,
 	.id_table       = rtsx_pci_sdmmc_ids,
-	.suspend	= rtsx_pci_sdmmc_suspend,
-	.resume		= rtsx_pci_sdmmc_resume,
 	.driver		= {
 		.owner	= THIS_MODULE,
 		.name	= DRV_NAME_RTSX_PCI_SDMMC,
+		.pm	= &rtsx_pci_sdmmc_dev_pm_ops,
 	},
 };
 module_platform_driver(rtsx_pci_sdmmc_driver);
-- 
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 ` [PATCH] mmc:mvsdio " Shuah Khan
2013-08-10 15:20 ` Shuah Khan [this message]
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-9-git-send-email-shuah.kh@samsung.com \
    --to=shuah.kh@samsung.com \
    --cc=arnd@arndb.de \
    --cc=cjb@laptop.org \
    --cc=jg1.han@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=shuahkhan@gmail.com \
    --cc=wei_wang@realsil.com.cn \
    /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®