diff options
author | Grygorii Strashko <Grygorii.Strashko@linaro.org> | 2015-01-14 15:42:20 +0200 |
---|---|---|
committer | Grygorii Strashko <Grygorii.Strashko@linaro.org> | 2015-02-09 23:28:39 +0800 |
commit | 8841cb218c60d6b74899b34e35533be9355343c4 (patch) | |
tree | 768f200d3ac30c56362d70921a528077dc34a406 | |
parent | 3eb5b3f225fdddf925070426f7e770a30b34e007 (diff) |
[hib-new-ti] net: ti: cpsw: add hibernation callbacks
Setting a dev_pm_ops suspend/resume pair but not a set of
hibernation functions means those pm functions will not be
called upon hibernation.
Fix this by using SIMPLE_DEV_PM_OPS, which appropriately
assigns the suspend and hibernation handlers.
Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 8704954b98b..b4fcf5f5243 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2805,6 +2805,7 @@ static int cpsw_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM_SLEEP static int cpsw_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -2857,11 +2858,9 @@ static int cpsw_resume(struct device *dev) } return 0; } +#endif -static const struct dev_pm_ops cpsw_pm_ops = { - .suspend = cpsw_suspend, - .resume = cpsw_resume, -}; +static SIMPLE_DEV_PM_OPS(cpsw_pm_ops, cpsw_suspend, cpsw_resume); static const struct of_device_id cpsw_of_mtable[] = { { .compatible = "ti,cpsw", }, |