diff options
author | Mike Rapoport <mike@compulab.co.il> | 2009-07-21 12:37:18 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-23 18:01:01 -0700 |
commit | 69222e2cb01ac3faaa8ca758c5ee036c191b8b9f (patch) | |
tree | ce8e394aa75f5e6e5cd6f81f0c44c2588fe14d97 | |
parent | 5be93b9a865344cf69958777c8d7c6f758cba416 (diff) |
dm9000: switch to dev_pm_ops
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | 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 8603806be89..a2bc4158259 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c @@ -1483,9 +1483,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) { @@ -1501,9 +1502,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) { @@ -1520,6 +1522,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) { @@ -1539,11 +1546,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 |