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: <1248541033-24639-1-git-send-email-arnaud.faucher@gmail.com>
Date:	Sat, 25 Jul 2009 12:57:13 -0400
From:	Arnaud Faucher <arnaud.faucher@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Arnaud Faucher <arnaud.faucher@...il.com>
Subject: [PATCH] net: irda: ali-ircc: switch driver to dev_pm_ops

Gets rid of the following warning:
Platform driver 'ali-ircc' needs updating - please use dev_pm_ops

Signed-off-by: Arnaud Faucher <arnaud.faucher@...il.com>
---
 drivers/net/irda/ali-ircc.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c
index ad17955..4ddc478 100644
--- a/drivers/net/irda/ali-ircc.c
+++ b/drivers/net/irda/ali-ircc.c
@@ -52,15 +52,19 @@
 #define ALI_IRCC_DRIVER_NAME "ali-ircc"
 
 /* Power Management */
-static int ali_ircc_suspend(struct platform_device *dev, pm_message_t state);
-static int ali_ircc_resume(struct platform_device *dev);
+static int ali_ircc_suspend(struct device *dev);
+static int ali_ircc_resume(struct device *dev);
 
-static struct platform_driver ali_ircc_driver = {
+static struct dev_pm_ops ali_ircc_pm_ops = {
 	.suspend	= ali_ircc_suspend,
 	.resume		= ali_ircc_resume,
+};
+
+static struct platform_driver ali_ircc_driver = {
 	.driver		= {
 		.name	= ALI_IRCC_DRIVER_NAME,
 		.owner	= THIS_MODULE,
+		.pm	= &ali_ircc_pm_ops,
 	},
 };
 
@@ -2120,9 +2124,9 @@ static int ali_ircc_is_receiving(struct ali_ircc_cb *self)
 	return status;
 }
 
-static int ali_ircc_suspend(struct platform_device *dev, pm_message_t state)
+static int ali_ircc_suspend(struct device *dev)
 {
-	struct ali_ircc_cb *self = platform_get_drvdata(dev);
+	struct ali_ircc_cb *self = dev_get_drvdata(dev);
 	
 	IRDA_MESSAGE("%s, Suspending\n", ALI_IRCC_DRIVER_NAME);
 
@@ -2136,9 +2140,9 @@ static int ali_ircc_suspend(struct platform_device *dev, pm_message_t state)
 	return 0;
 }
 
-static int ali_ircc_resume(struct platform_device *dev)
+static int ali_ircc_resume(struct device *dev)
 {
-	struct ali_ircc_cb *self = platform_get_drvdata(dev);
+	struct ali_ircc_cb *self = dev_get_drvdata(dev);
 	
 	if (!self->io.suspended)
 		return 0;
-- 
1.6.3.3

--
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