Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171161
b: refs/heads/master
c: 8d044fe
h: refs/heads/master
i:
  171159: 5b93026
v: v3
  • Loading branch information
Ranjith Lohithakshan authored and David S. Miller committed Nov 5, 2009
1 parent cfefcd1 commit 8b12979
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 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: 9f9354b92defa15aa0e215946c6e2dbccecb6aa7
refs/heads/master: 8d044fe6aacaf573112331847155211a56a12736
30 changes: 27 additions & 3 deletions trunk/drivers/net/davinci_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2806,11 +2806,33 @@ 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)
{
struct net_device *dev = platform_get_drvdata(pdev);

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

clk_disable(emac_clk);

return 0;
}

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

clk_enable(emac_clk);

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

return 0;
}

/**
* davinci_emac_driver: EMAC platform driver structure
*
* We implement only probe and remove functions - suspend/resume and
* others not supported by this module
*/
static struct platform_driver davinci_emac_driver = {
.driver = {
Expand All @@ -2819,6 +2841,8 @@ static struct platform_driver davinci_emac_driver = {
},
.probe = davinci_emac_probe,
.remove = __devexit_p(davinci_emac_remove),
.suspend = davinci_emac_suspend,
.resume = davinci_emac_resume,
};

/**
Expand Down

0 comments on commit 8b12979

Please sign in to comment.