[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1248526047-18017-1-git-send-email-arnaud.faucher@gmail.com>
Date: Sat, 25 Jul 2009 08:47:27 -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: smsc-ircc2: switch driver to dev_pm_ops
Gets rid of the following warning:
Platform driver 'smsc-ircc2' needs updating - please use dev_pm_ops
Signed-off-by: Arnaud Faucher <arnaud.faucher@...il.com>
---
drivers/net/irda/smsc-ircc2.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index d0797ad..0e216fe 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -250,14 +250,18 @@ static int smsc_ircc_probe_transceiver_smsc_ircc_atc(int fir_base);
/* Power Management */
-static int smsc_ircc_suspend(struct platform_device *dev, pm_message_t state);
-static int smsc_ircc_resume(struct platform_device *dev);
+static int smsc_ircc_suspend(struct device *dev);
+static int smsc_ircc_resume(struct device *dev);
-static struct platform_driver smsc_ircc_driver = {
+static struct dev_pm_ops smsc_ircc_pm_ops = {
.suspend = smsc_ircc_suspend,
.resume = smsc_ircc_resume,
+};
+
+static struct platform_driver smsc_ircc_driver = {
.driver = {
.name = SMSC_IRCC2_DRIVER_NAME,
+ .pm = &smsc_ircc_pm_ops,
},
};
@@ -1782,9 +1786,9 @@ static int smsc_ircc_net_close(struct net_device *dev)
return 0;
}
-static int smsc_ircc_suspend(struct platform_device *dev, pm_message_t state)
+static int smsc_ircc_suspend(struct device *dev)
{
- struct smsc_ircc_cb *self = platform_get_drvdata(dev);
+ struct smsc_ircc_cb *self = dev_get_drvdata(dev);
if (!self->io.suspended) {
IRDA_DEBUG(1, "%s, Suspending\n", driver_name);
@@ -1803,9 +1807,9 @@ static int smsc_ircc_suspend(struct platform_device *dev, pm_message_t state)
return 0;
}
-static int smsc_ircc_resume(struct platform_device *dev)
+static int smsc_ircc_resume(struct device *dev)
{
- struct smsc_ircc_cb *self = platform_get_drvdata(dev);
+ struct smsc_ircc_cb *self = dev_get_drvdata(dev);
if (self->io.suspended) {
IRDA_DEBUG(1, "%s, Waking up\n", driver_name);
--
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