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>] [day] [month] [year] [list]
Message-Id: <1376149181-2761-1-git-send-email-shuah.kh@samsung.com>
Date:	Sat, 10 Aug 2013 09:39:41 -0600
From:	Shuah Khan <shuah.kh@...sung.com>
To:	jarkko.lavinen@...ia.com, cjb@...top.org
Cc:	Shuah Khan <shuah.kh@...sung.com>, linux-omap@...r.kernel.org,
	linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
	shuahkhan@...il.com
Subject: [PATCH] mmc:omap change driver to use dev_pm_ops infrastructure

Change mmc_omap 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/omap.c |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index b94f38e..3251df2 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1514,10 +1514,11 @@ static int mmc_omap_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
-static int mmc_omap_suspend(struct platform_device *pdev, pm_message_t mesg)
+static int mmc_omap_suspend(struct device *dev)
 {
 	int i, ret = 0;
-	struct mmc_omap_host *host = platform_get_drvdata(pdev);
+	struct mmc_omap_host *host = platform_get_drvdata(to_platform_device(
+							  dev));
 
 	if (host == NULL || host->suspended)
 		return 0;
@@ -1539,10 +1540,11 @@ static int mmc_omap_suspend(struct platform_device *pdev, pm_message_t mesg)
 	return 0;
 }
 
-static int mmc_omap_resume(struct platform_device *pdev)
+static int mmc_omap_resume(struct device *dev)
 {
 	int i, ret = 0;
-	struct mmc_omap_host *host = platform_get_drvdata(pdev);
+	struct mmc_omap_host *host = platform_get_drvdata(to_platform_device(
+							  dev));
 
 	if (host == NULL || !host->suspended)
 		return 0;
@@ -1563,14 +1565,16 @@ static int mmc_omap_resume(struct platform_device *pdev)
 #define mmc_omap_resume		NULL
 #endif
 
+static SIMPLE_DEV_PM_OPS(mmc_omap_dev_pm_ops, mmc_omap_suspend,
+			 mmc_omap_resume);
+
 static struct platform_driver mmc_omap_driver = {
 	.probe		= mmc_omap_probe,
 	.remove		= mmc_omap_remove,
-	.suspend	= mmc_omap_suspend,
-	.resume		= mmc_omap_resume,
 	.driver		= {
 		.name	= DRIVER_NAME,
 		.owner	= THIS_MODULE,
+		.pm	= &mmc_omap_dev_pm_ops,
 	},
 };
 
-- 
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