Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202673
b: refs/heads/master
c: 59d4289
h: refs/heads/master
i:
  202671: 7acf5f7
v: v3
  • Loading branch information
Denis Kirjanov authored and David S. Miller committed Jun 5, 2010
1 parent 8049a3b commit 8fcae56
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 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: bb1d912323d5dd50e1079e389f4e964be14f0ae3
refs/heads/master: 59d4289b83b11379d867e2f7146904b19cc96404
22 changes: 20 additions & 2 deletions trunk/drivers/net/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,8 @@ fec_drv_remove(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM

static int
fec_suspend(struct platform_device *dev, pm_message_t state)
{
Expand Down Expand Up @@ -1389,15 +1391,31 @@ fec_resume(struct platform_device *dev)
return 0;
}

static const struct dev_pm_ops fec_pm_ops = {
.suspend = fec_suspend,
.resume = fec_resume,
.freeze = fec_suspend,
.thaw = fec_resume,
.poweroff = fec_suspend,
.restore = fec_resume,
};

#define FEC_PM_OPS (&fec_pm_ops)

#else /* !CONFIG_PM */

#define FEC_PM_OPS NULL

#endif /* !CONFIG_PM */

static struct platform_driver fec_driver = {
.driver = {
.name = "fec",
.owner = THIS_MODULE,
.pm = FEC_PM_OPS,
},
.probe = fec_probe,
.remove = __devexit_p(fec_drv_remove),
.suspend = fec_suspend,
.resume = fec_resume,
};

static int __init
Expand Down

0 comments on commit 8fcae56

Please sign in to comment.