All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] [media] adv7180: Simplify PM hooks
@ 2014-12-16 16:49 Fabio Estevam
  2014-12-16 16:49 ` [PATCH 2/2] [media] adv7180: Remove the unneeded 'err' label Fabio Estevam
  2014-12-16 21:20 ` [PATCH 1/2] [media] adv7180: Simplify PM hooks Lars-Peter Clausen
  0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2014-12-16 16:49 UTC (permalink / raw)
  To: mchehab; +Cc: hans.verkuil, linux-media, Fabio Estevam

The macro SIMPLE_DEV_PM_OPS already takes care of the CONFIG_PM_SLEEP=n case, so
move it out of the CONFIG_PM_SLEEP 'if' block and remove the unneeded 
ADV7180_PM_OPS definition to make the code simpler.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/media/i2c/adv7180.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index bffe6eb..0c1268a 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -700,13 +700,8 @@ static int adv7180_resume(struct device *dev)
 		return ret;
 	return 0;
 }
-
-static SIMPLE_DEV_PM_OPS(adv7180_pm_ops, adv7180_suspend, adv7180_resume);
-#define ADV7180_PM_OPS (&adv7180_pm_ops)
-
-#else
-#define ADV7180_PM_OPS NULL
 #endif
+static SIMPLE_DEV_PM_OPS(adv7180_pm_ops, adv7180_suspend, adv7180_resume);
 
 MODULE_DEVICE_TABLE(i2c, adv7180_id);
 
@@ -714,7 +709,7 @@ static struct i2c_driver adv7180_driver = {
 	.driver = {
 		   .owner = THIS_MODULE,
 		   .name = KBUILD_MODNAME,
-		   .pm = ADV7180_PM_OPS,
+		   .pm = &adv7180_pm_ops,
 		   },
 	.probe = adv7180_probe,
 	.remove = adv7180_remove,
-- 
1.9.1


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

end of thread, other threads:[~2015-01-16 11:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 16:49 [PATCH 1/2] [media] adv7180: Simplify PM hooks Fabio Estevam
2014-12-16 16:49 ` [PATCH 2/2] [media] adv7180: Remove the unneeded 'err' label Fabio Estevam
2015-01-16 11:30   ` Lars-Peter Clausen
2014-12-16 21:20 ` [PATCH 1/2] [media] adv7180: Simplify PM hooks Lars-Peter Clausen

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.