All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] net: davinci_mdio: add hibernation callbacks
@ 2015-02-27 11:19 ` grygorii.strashko
  0 siblings, 0 replies; 6+ messages in thread
From: grygorii.strashko @ 2015-02-27 11:19 UTC (permalink / raw)
  To: David S. Miller, Felipe Balbi
  Cc: nm, sumit.semwal, Mugunthan V N, netdev, linux-omap, Grygorii Strashko

From: Grygorii Strashko <Grygorii.Strashko@linaro.org>

Setting a dev_pm_ops suspend_late/resume_early pair but not a
set of hibernation functions means those pm functions will
not be called upon hibernation.
Fix this by using SET_LATE_SYSTEM_SLEEP_PM_OPS, which appropriately
assigns the suspend and hibernation handlers and move
davinci_mdio_x callbacks under CONFIG_PM_SLEEP to avoid build warnings.

Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
---
 drivers/net/ethernet/ti/davinci_mdio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index e58f0a7..25871dc 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -438,6 +438,7 @@ static int davinci_mdio_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int davinci_mdio_suspend(struct device *dev)
 {
 	struct davinci_mdio_data *data = dev_get_drvdata(dev);
@@ -479,10 +480,10 @@ static int davinci_mdio_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static const struct dev_pm_ops davinci_mdio_pm_ops = {
-	.suspend_late	= davinci_mdio_suspend,
-	.resume_early	= davinci_mdio_resume,
+	SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
 };
 
 #if IS_ENABLED(CONFIG_OF)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 1/2] net: davinci_mdio: add hibernation callbacks
@ 2015-02-27 11:19 ` grygorii.strashko
  0 siblings, 0 replies; 6+ messages in thread
From: grygorii.strashko @ 2015-02-27 11:19 UTC (permalink / raw)
  To: David S. Miller, Felipe Balbi
  Cc: nm, sumit.semwal, Mugunthan V N, netdev, linux-omap, Grygorii Strashko

From: Grygorii Strashko <Grygorii.Strashko@linaro.org>

Setting a dev_pm_ops suspend_late/resume_early pair but not a
set of hibernation functions means those pm functions will
not be called upon hibernation.
Fix this by using SET_LATE_SYSTEM_SLEEP_PM_OPS, which appropriately
assigns the suspend and hibernation handlers and move
davinci_mdio_x callbacks under CONFIG_PM_SLEEP to avoid build warnings.

Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
---
 drivers/net/ethernet/ti/davinci_mdio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index e58f0a7..25871dc 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -438,6 +438,7 @@ static int davinci_mdio_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM_SLEEP
 static int davinci_mdio_suspend(struct device *dev)
 {
 	struct davinci_mdio_data *data = dev_get_drvdata(dev);
@@ -479,10 +480,10 @@ static int davinci_mdio_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static const struct dev_pm_ops davinci_mdio_pm_ops = {
-	.suspend_late	= davinci_mdio_suspend,
-	.resume_early	= davinci_mdio_resume,
+	SET_LATE_SYSTEM_SLEEP_PM_OPS(davinci_mdio_suspend, davinci_mdio_resume)
 };
 
 #if IS_ENABLED(CONFIG_OF)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] net: ti: cpsw: add hibernation callbacks
  2015-02-27 11:19 ` grygorii.strashko
@ 2015-02-27 11:19   ` grygorii.strashko
  -1 siblings, 0 replies; 6+ messages in thread
From: grygorii.strashko @ 2015-02-27 11:19 UTC (permalink / raw)
  To: David S. Miller, Felipe Balbi
  Cc: nm, sumit.semwal, Mugunthan V N, netdev, linux-omap, Grygorii Strashko

From: Grygorii Strashko <Grygorii.Strashko@linaro.org>

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 and move
cpsw_suspend/resume calbacks under CONFIG_PM_SLEEP
to avoid build warnings.

Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
---
 drivers/net/ethernet/ti/cpsw.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 8704954..b4fcf5f 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", },
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] net: ti: cpsw: add hibernation callbacks
@ 2015-02-27 11:19   ` grygorii.strashko
  0 siblings, 0 replies; 6+ messages in thread
From: grygorii.strashko @ 2015-02-27 11:19 UTC (permalink / raw)
  To: David S. Miller, Felipe Balbi
  Cc: nm, sumit.semwal, Mugunthan V N, netdev, linux-omap, Grygorii Strashko

From: Grygorii Strashko <Grygorii.Strashko@linaro.org>

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 and move
cpsw_suspend/resume calbacks under CONFIG_PM_SLEEP
to avoid build warnings.

Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
---
 drivers/net/ethernet/ti/cpsw.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 8704954..b4fcf5f 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", },
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] net: davinci_mdio: add hibernation callbacks
  2015-02-27 11:19 ` grygorii.strashko
  (?)
  (?)
@ 2015-03-02  4:27 ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-03-02  4:27 UTC (permalink / raw)
  To: grygorii.strashko
  Cc: balbi, nm, sumit.semwal, mugunthanvnm, netdev, linux-omap

From: <grygorii.strashko@linaro.org>
Date: Fri, 27 Feb 2015 13:19:44 +0200

> From: Grygorii Strashko <Grygorii.Strashko@linaro.org>
> 
> Setting a dev_pm_ops suspend_late/resume_early pair but not a
> set of hibernation functions means those pm functions will
> not be called upon hibernation.
> Fix this by using SET_LATE_SYSTEM_SLEEP_PM_OPS, which appropriately
> assigns the suspend and hibernation handlers and move
> davinci_mdio_x callbacks under CONFIG_PM_SLEEP to avoid build warnings.
> 
> Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] net: ti: cpsw: add hibernation callbacks
  2015-02-27 11:19   ` grygorii.strashko
  (?)
@ 2015-03-02  4:27   ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-03-02  4:27 UTC (permalink / raw)
  To: grygorii.strashko
  Cc: balbi, nm, sumit.semwal, mugunthanvnm, netdev, linux-omap

From: <grygorii.strashko@linaro.org>
Date: Fri, 27 Feb 2015 13:19:45 +0200

> From: Grygorii Strashko <Grygorii.Strashko@linaro.org>
> 
> 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 and move
> cpsw_suspend/resume calbacks under CONFIG_PM_SLEEP
> to avoid build warnings.
> 
> Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-03-02  4:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27 11:19 [PATCH 1/2] net: davinci_mdio: add hibernation callbacks grygorii.strashko
2015-02-27 11:19 ` grygorii.strashko
2015-02-27 11:19 ` [PATCH 2/2] net: ti: cpsw: " grygorii.strashko
2015-02-27 11:19   ` grygorii.strashko
2015-03-02  4:27   ` David Miller
2015-03-02  4:27 ` [PATCH 1/2] net: davinci_mdio: " David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.