Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188124
b: refs/heads/master
c: d4fdcd9
h: refs/heads/master
v: v3
  • Loading branch information
chaithrika@ti.com authored and David S. Miller committed Mar 15, 2010
1 parent 0bb3286 commit 72772f0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be5bce2bf5cfe021bc6bdff4d49fa18776bc293d
refs/heads/master: d4fdcd923daf9d03d2e1b956d66f05c3f2ca4c43
27 changes: 16 additions & 11 deletions trunk/drivers/net/davinci_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2827,43 +2827,48 @@ static int __devexit davinci_emac_remove(struct platform_device *pdev)
return 0;
}

static
int davinci_emac_suspend(struct platform_device *pdev, pm_message_t state)
static int davinci_emac_suspend(struct device *dev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct platform_device *pdev = to_platform_device(dev);
struct net_device *ndev = platform_get_drvdata(pdev);

if (netif_running(dev))
emac_dev_stop(dev);
if (netif_running(ndev))
emac_dev_stop(ndev);

clk_disable(emac_clk);

return 0;
}

static int davinci_emac_resume(struct platform_device *pdev)
static int davinci_emac_resume(struct device *dev)
{
struct net_device *dev = platform_get_drvdata(pdev);
struct platform_device *pdev = to_platform_device(dev);
struct net_device *ndev = platform_get_drvdata(pdev);

clk_enable(emac_clk);

if (netif_running(dev))
emac_dev_open(dev);
if (netif_running(ndev))
emac_dev_open(ndev);

return 0;
}

static const struct dev_pm_ops davinci_emac_pm_ops = {
.suspend = davinci_emac_suspend,
.resume = davinci_emac_resume,
};

/**
* davinci_emac_driver: EMAC platform driver structure
*/
static struct platform_driver davinci_emac_driver = {
.driver = {
.name = "davinci_emac",
.owner = THIS_MODULE,
.pm = &davinci_emac_pm_ops,
},
.probe = davinci_emac_probe,
.remove = __devexit_p(davinci_emac_remove),
.suspend = davinci_emac_suspend,
.resume = davinci_emac_resume,
};

/**
Expand Down

0 comments on commit 72772f0

Please sign in to comment.