[PATCH 7/9] as3645a: use struct dev_pm_ops

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

 



Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
 drivers/media/video/as3645a.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/as3645a.c b/drivers/media/video/as3645a.c
index 9aebaa2..774f797 100644
--- a/drivers/media/video/as3645a.c
+++ b/drivers/media/video/as3645a.c
@@ -646,8 +646,9 @@ static const struct v4l2_subdev_internal_ops as3645a_internal_ops = {
  */
 #ifdef CONFIG_PM
 
-static int as3645a_suspend(struct i2c_client *client, pm_message_t mesg)
+static int as3645a_suspend(struct device *dev)
 {
+	struct i2c_client *client = to_i2c_client(dev);
 	struct v4l2_subdev *subdev = i2c_get_clientdata(client);
 	struct as3645a *flash = to_as3645a(subdev);
 	int rval;
@@ -662,8 +663,9 @@ static int as3645a_suspend(struct i2c_client *client, pm_message_t mesg)
 	return rval;
 }
 
-static int as3645a_resume(struct i2c_client *client)
+static int as3645a_resume(struct device *dev)
 {
+	struct i2c_client *client = to_i2c_client(dev);
 	struct v4l2_subdev *subdev = i2c_get_clientdata(client);
 	struct as3645a *flash = to_as3645a(subdev);
 	int rval;
@@ -841,14 +843,18 @@ static const struct i2c_device_id as3645a_id_table[] = {
 };
 MODULE_DEVICE_TABLE(i2c, as3645a_id_table);
 
+static const struct dev_pm_ops as3645a_pm_ops = {
+	.suspend = as3645a_suspend,
+	.resume = as3645a_resume,
+};
+
 static struct i2c_driver as3645a_i2c_driver = {
 	.driver	= {
 		.name = AS3645A_NAME,
+		.pm   = &as3645a_pm_ops,
 	},
 	.probe	= as3645a_probe,
 	.remove	= __exit_p(as3645a_remove),
-	.suspend = as3645a_suspend,
-	.resume = as3645a_resume,
 	.id_table = as3645a_id_table,
 };
 
-- 
1.7.7.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