lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 10 Aug 2013 09:20:54 -0600
From:	Shuah Khan <shuah.kh@...sung.com>
To:	cjb@...top.org, wei_wang@...lsil.com.cn, sameo@...ux.intel.com,
	arnd@...db.de, jg1.han@...sung.com
Cc:	Shuah Khan <shuah.kh@...sung.com>, linux-mmc@...r.kernel.org,
	linux-kernel@...r.kernel.org, shuahkhan@...il.com
Subject: [PATCH] mmc:rtsx_pci_sdmmc change driver to use dev_pm_ops infrastructure

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@...sung.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ