[PATCH 1/2] [media] adv7180: Simplify PM hooks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux