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:50 -0600
From:	Shuah Khan <shuah.kh@...sung.com>
To:	mirq-linux@...e.qmqm.pl, cjb@...top.org
Cc:	Shuah Khan <shuah.kh@...sung.com>, linux-mmc@...r.kernel.org,
	linux-kernel@...r.kernel.org, shuahkhan@...il.com
Subject: [PATCH] mmc:cb710_mmc change driver to use dev_pm_ops infrastructure

Change cb710_mmc platform driver 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/cb710-mmc.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
index 9d6e2b8..e79ac0d 100644
--- a/drivers/mmc/host/cb710-mmc.c
+++ b/drivers/mmc/host/cb710-mmc.c
@@ -664,8 +664,9 @@ static const struct mmc_host_ops cb710_mmc_host = {
 
 #ifdef CONFIG_PM
 
-static int cb710_mmc_suspend(struct platform_device *pdev, pm_message_t state)
+static int cb710_mmc_suspend(struct device *dev)
 {
+	struct platform_device *pdev = to_platform_device(dev);
 	struct cb710_slot *slot = cb710_pdev_to_slot(pdev);
 	struct mmc_host *mmc = cb710_slot_to_mmc(slot);
 	int err;
@@ -678,8 +679,9 @@ static int cb710_mmc_suspend(struct platform_device *pdev, pm_message_t state)
 	return 0;
 }
 
-static int cb710_mmc_resume(struct platform_device *pdev)
+static int cb710_mmc_resume(struct device *dev)
 {
+	struct platform_device *pdev = to_platform_device(dev);
 	struct cb710_slot *slot = cb710_pdev_to_slot(pdev);
 	struct mmc_host *mmc = cb710_slot_to_mmc(slot);
 
@@ -688,6 +690,8 @@ static int cb710_mmc_resume(struct platform_device *pdev)
 	return mmc_resume_host(mmc);
 }
 
+static SIMPLE_DEV_PM_OPS(cb710_mmc_dev_pm_ops, cb710_mmc_suspend,
+			 cb710_mmc_resume);
 #endif /* CONFIG_PM */
 
 static int cb710_mmc_init(struct platform_device *pdev)
@@ -775,8 +779,7 @@ static struct platform_driver cb710_mmc_driver = {
 	.probe = cb710_mmc_init,
 	.remove = cb710_mmc_exit,
 #ifdef CONFIG_PM
-	.suspend = cb710_mmc_suspend,
-	.resume = cb710_mmc_resume,
+	.driver.pm = &cb710_mmc_dev_pm_ops,
 #endif
 };
 
-- 
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