[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A65D8E6.5010005@simtec.co.uk>
Date: Tue, 21 Jul 2009 16:04:06 +0100
From: Ben Dooks <ben@...tec.co.uk>
To: Mike Rapoport <mike@...pulab.co.il>
CC: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] dm9000: switch to dev_pm_ops
Mike Rapoport wrote:
> Signed-off-by: Mike Rapoport <mike@...pulab.co.il>
Acked-by: Ben Dooks <ben-linux@...ff.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/
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists