From: Ben Dooks <ben@simtec.co.uk>
To: Mike Rapoport <mike@compulab.co.il>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] dm9000: switch to dev_pm_ops
Date: Tue, 21 Jul 2009 16:04:06 +0100 [thread overview]
Message-ID: <4A65D8E6.5010005@simtec.co.uk> (raw)
In-Reply-To: <1248184837-22350-1-git-send-email-mike@compulab.co.il>
Mike Rapoport wrote:
> Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Ben Dooks <ben-linux@fluff.org>
> ---
> drivers/net/dm9000.c | 18 ++++++++++++------
> 1 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
> index dd771de..7b639cd 100644
> --- a/drivers/net/dm9000.c
> +++ b/drivers/net/dm9000.c
> @@ -1410,9 +1410,10 @@ out:
> }
>
> static int
> -dm9000_drv_suspend(struct platform_device *dev, pm_message_t state)
> +dm9000_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);
> board_info_t *db;
>
> if (ndev) {
> @@ -1428,9 +1429,10 @@ dm9000_drv_suspend(struct platform_device *dev, pm_message_t state)
> }
>
> static int
> -dm9000_drv_resume(struct platform_device *dev)
> +dm9000_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);
> board_info_t *db = netdev_priv(ndev);
>
> if (ndev) {
> @@ -1447,6 +1449,11 @@ dm9000_drv_resume(struct platform_device *dev)
> return 0;
> }
>
> +static struct dev_pm_ops dm9000_drv_pm_ops = {
> + .suspend = dm9000_drv_suspend,
> + .resume = dm9000_drv_resume,
> +};
> +
> static int __devexit
> dm9000_drv_remove(struct platform_device *pdev)
> {
> @@ -1466,11 +1473,10 @@ static struct platform_driver dm9000_driver = {
> .driver = {
> .name = "dm9000",
> .owner = THIS_MODULE,
> + .pm = &dm9000_drv_pm_ops,
> },
> .probe = dm9000_probe,
> .remove = __devexit_p(dm9000_drv_remove),
> - .suspend = dm9000_drv_suspend,
> - .resume = dm9000_drv_resume,
> };
>
> static int __init
--
Ben Dooks, Software Engineer, Simtec Electronics
http://www.simtec.co.uk/
next prev parent reply other threads:[~2009-07-21 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 14:00 [PATCH] dm9000: switch to dev_pm_ops Mike Rapoport
2009-07-21 15:04 ` Ben Dooks [this message]
2009-07-21 19:37 ` David Miller
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=4A65D8E6.5010005@simtec.co.uk \
--to=ben@simtec.co.uk \
--cc=davem@davemloft.net \
--cc=mike@compulab.co.il \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.