From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Cc: linux-m68k@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 02/11] m68k: Atari EtherNAT - convert to dev_pm_ops
Date: Wed, 26 May 2010 19:48:44 +0200 [thread overview]
Message-ID: <1274896133-19590-3-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1274896133-19590-1-git-send-email-geert@linux-m68k.org>
Cfr. commit 9f950f72e57fe4bf9b16ace67e4cc5ffcee79d00 ("NET: smc91x: convert to
dev_pm_ops")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/net/atari_91C111.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/atari_91C111.c b/drivers/net/atari_91C111.c
index bb28b19..d902c10 100644
--- a/drivers/net/atari_91C111.c
+++ b/drivers/net/atari_91C111.c
@@ -2365,9 +2365,10 @@ static int __devexit smc_drv_remove(struct platform_device *pdev)
return 0;
}
-static int smc_drv_suspend(struct platform_device *dev, pm_message_t state)
+static int smc_drv_suspend(struct device *dev)
{
- struct net_device *ndev = platform_get_drvdata(dev);
+ struct platform_device *pdev = to_platform_device(dev);
+ struct net_device *ndev = platform_get_drvdata(pdev);
if (ndev) {
if (netif_running(ndev)) {
@@ -2379,9 +2380,10 @@ static int smc_drv_suspend(struct platform_device *dev, pm_message_t state)
return 0;
}
-static int smc_drv_resume(struct platform_device *dev)
+static int smc_drv_resume(struct device *dev)
{
- struct net_device *ndev = platform_get_drvdata(dev);
+ struct platform_device *pdev = to_platform_device(dev);
+ struct net_device *ndev = platform_get_drvdata(pdev);
if (ndev) {
struct smc_local *lp = netdev_priv(ndev);
@@ -2397,14 +2399,18 @@ static int smc_drv_resume(struct platform_device *dev)
return 0;
}
+static struct dev_pm_ops smc_drv_pm_ops = {
+ .suspend = smc_drv_suspend,
+ .resume = smc_drv_resume,
+};
+
static struct platform_driver smc_driver = {
.probe = smc_drv_probe,
.remove = __devexit_p(smc_drv_remove),
- .suspend = smc_drv_suspend,
- .resume = smc_drv_resume,
.driver = {
.name = CARDNAME,
.owner = THIS_MODULE,
+ .pm = &smc_drv_pm_ops,
},
};
--
1.7.0.4
next prev parent reply other threads:[~2010-05-26 17:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 17:48 [PATCH 0/11] m68k: Atari EtherNAT Updates Geert Uytterhoeven
2010-05-26 17:48 ` [PATCH 01/11] m68k: Atari EtherNAT - request_irq - Remove unnecessary leading & from second arg Geert Uytterhoeven
2010-05-26 17:48 ` Geert Uytterhoeven [this message]
2010-05-26 17:48 ` [PATCH 03/11] m68k: Atari EtherNAT - Fix irq flags Geert Uytterhoeven
2010-05-26 17:48 ` [PATCH 04/11] m68k: Atari EtherNAT - fix unused flags warnings on UP systems Geert Uytterhoeven
2010-05-26 17:48 ` [PATCH 05/11] m68k: Atari EtherNAT - Fix up type mismatch in smc_drv_resume() Geert Uytterhoeven
2010-05-26 17:48 ` [PATCH 06/11] m68k: Atari EtherNAT - use netdev_mc_count and netdev_mc_empty when appropriate Geert Uytterhoeven
2010-05-26 17:48 ` [PATCH 07/11] m68k: Atari EtherNAT - convert multiple drivers to use netdev_for_each_mc_addr Geert Uytterhoeven
2010-05-26 17:48 ` [PATCH 08/11] m68k: Atari EtherNAT - remove trailing space in messages Geert Uytterhoeven
2010-05-26 17:48 ` [PATCH 09/11] m68k: Atari EtherNAT - include cleanup: slab.h Geert Uytterhoeven
2010-05-26 17:48 ` [PATCH 10/11] m68k: Atari EtherNAT - convert multicast list to list_head Geert Uytterhoeven
2010-05-26 17:48 ` [PATCH 11/11] m68k: Atari EtherNAT - trans_start cleanups Geert Uytterhoeven
2010-06-06 3:59 ` [PATCH 0/11] m68k: Atari EtherNAT Updates Michael Schmitz
2010-06-06 8:25 ` Geert Uytterhoeven
2010-06-07 5:10 ` Michael Schmitz
2010-06-08 11:35 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1274896133-19590-3-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
--cc=schmitz@biophys.uni-duesseldorf.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox