* [PATCH] net: irda: nsc-ircc: switch driver to dev_pm_ops
@ 2009-07-25 17:28 Arnaud Faucher
0 siblings, 0 replies; only message in thread
From: Arnaud Faucher @ 2009-07-25 17:28 UTC (permalink / raw)
To: linux-kernel; +Cc: Arnaud Faucher
Gets rid of the following warning:
Platform driver 'nsc-ircc' needs updating - please use dev_pm_ops
Signed-off-by: Arnaud Faucher <arnaud.faucher@gmail.com>
---
drivers/net/irda/nsc-ircc.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index 45fd9c1..c56946a 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -74,14 +74,18 @@ static char *driver_name = "nsc-ircc";
/* Power Management */
#define NSC_IRCC_DRIVER_NAME "nsc-ircc"
-static int nsc_ircc_suspend(struct platform_device *dev, pm_message_t state);
-static int nsc_ircc_resume(struct platform_device *dev);
+static int nsc_ircc_suspend(struct device *dev);
+static int nsc_ircc_resume(struct device *dev);
-static struct platform_driver nsc_ircc_driver = {
+static struct dev_pm_ops nsc_ircc_pm_ops = {
.suspend = nsc_ircc_suspend,
.resume = nsc_ircc_resume,
+};
+
+static struct platform_driver nsc_ircc_driver = {
.driver = {
.name = NSC_IRCC_DRIVER_NAME,
+ .pm = &nsc_ircc_pm_ops,
},
};
@@ -2316,9 +2320,9 @@ static int nsc_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
return ret;
}
-static int nsc_ircc_suspend(struct platform_device *dev, pm_message_t state)
+static int nsc_ircc_suspend(struct device *dev)
{
- struct nsc_ircc_cb *self = platform_get_drvdata(dev);
+ struct nsc_ircc_cb *self = dev_get_drvdata(dev);
int bank;
unsigned long flags;
int iobase = self->io.fir_base;
@@ -2352,9 +2356,9 @@ static int nsc_ircc_suspend(struct platform_device *dev, pm_message_t state)
return 0;
}
-static int nsc_ircc_resume(struct platform_device *dev)
+static int nsc_ircc_resume(struct device *dev)
{
- struct nsc_ircc_cb *self = platform_get_drvdata(dev);
+ struct nsc_ircc_cb *self = dev_get_drvdata(dev);
unsigned long flags;
if (!self->io.suspended)
--
1.6.3.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-25 17:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-25 17:28 [PATCH] net: irda: nsc-ircc: switch driver to dev_pm_ops Arnaud Faucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®