diff options
author | Mike Rapoport <mike@compulab.co.il> | 2009-07-21 15:37:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-23 21:01:01 -0400 |
commit | 69222e2cb01ac3faaa8ca758c5ee036c191b8b9f (patch) | |
tree | ce8e394aa75f5e6e5cd6f81f0c44c2588fe14d97 /drivers | |
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>
Diffstat (limited to 'drivers')
-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 8603806be898..a2bc4158259a 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -1483,9 +1483,10 @@ out: | |||
1483 | } | 1483 | } |
1484 | 1484 | ||
1485 | static int | 1485 | static int |
1486 | dm9000_drv_suspend(struct platform_device *dev, pm_message_t state) | 1486 | dm9000_drv_suspend(struct device *dev) |
1487 | { | 1487 | { |
1488 | struct net_device *ndev = platform_get_drvdata(dev); | 1488 | struct platform_device *pdev = to_platform_device(dev); |
1489 | struct net_device *ndev = platform_get_drvdata(pdev); | ||
1489 | board_info_t *db; | 1490 | board_info_t *db; |
1490 | 1491 | ||
1491 | if (ndev) { | 1492 | if (ndev) { |
@@ -1501,9 +1502,10 @@ dm9000_drv_suspend(struct platform_device *dev, pm_message_t state) | |||
1501 | } | 1502 | } |
1502 | 1503 | ||
1503 | static int | 1504 | static int |
1504 | dm9000_drv_resume(struct platform_device *dev) | 1505 | dm9000_drv_resume(struct device *dev) |
1505 | { | 1506 | { |
1506 | struct net_device *ndev = platform_get_drvdata(dev); | 1507 | struct platform_device *pdev = to_platform_device(dev); |
1508 | struct net_device *ndev = platform_get_drvdata(pdev); | ||
1507 | board_info_t *db = netdev_priv(ndev); | 1509 | board_info_t *db = netdev_priv(ndev); |
1508 | 1510 | ||
1509 | if (ndev) { | 1511 | if (ndev) { |
@@ -1520,6 +1522,11 @@ dm9000_drv_resume(struct platform_device *dev) | |||
1520 | return 0; | 1522 | return 0; |
1521 | } | 1523 | } |
1522 | 1524 | ||
1525 | static struct dev_pm_ops dm9000_drv_pm_ops = { | ||
1526 | .suspend = dm9000_drv_suspend, | ||
1527 | .resume = dm9000_drv_resume, | ||
1528 | }; | ||
1529 | |||
1523 | static int __devexit | 1530 | static int __devexit |
1524 | dm9000_drv_remove(struct platform_device *pdev) | 1531 | dm9000_drv_remove(struct platform_device *pdev) |
1525 | { | 1532 | { |
@@ -1539,11 +1546,10 @@ static struct platform_driver dm9000_driver = { | |||
1539 | .driver = { | 1546 | .driver = { |
1540 | .name = "dm9000", | 1547 | .name = "dm9000", |
1541 | .owner = THIS_MODULE, | 1548 | .owner = THIS_MODULE, |
1549 | .pm = &dm9000_drv_pm_ops, | ||
1542 | }, | 1550 | }, |
1543 | .probe = dm9000_probe, | 1551 | .probe = dm9000_probe, |
1544 | .remove = __devexit_p(dm9000_drv_remove), | 1552 | .remove = __devexit_p(dm9000_drv_remove), |
1545 | .suspend = dm9000_drv_suspend, | ||
1546 | .resume = dm9000_drv_resume, | ||
1547 | }; | 1553 | }; |
1548 | 1554 | ||
1549 | static int __init | 1555 | static int __init |