Commit d2484fbf authored by Daniel Scally's avatar Daniel Scally Committed by Mauro Carvalho Chehab

media: i2c: Re-order runtime pm initialisation

The kerneldoc for pm_runtime_set_suspended() says:

"It is not valid to call this function for devices with runtime PM
enabled"

To satisfy that requirement, re-order the calls so that
pm_runtime_enable() is the last one.

Fixes: 11c0d8fd ("media: i2c: Add support for the OV8865 image sensor")
Signed-off-by: default avatarDaniel Scally <djrscally@gmail.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 887bda23
...@@ -2897,8 +2897,8 @@ static int ov8865_probe(struct i2c_client *client) ...@@ -2897,8 +2897,8 @@ static int ov8865_probe(struct i2c_client *client)
/* Runtime PM */ /* Runtime PM */
pm_runtime_enable(sensor->dev);
pm_runtime_set_suspended(sensor->dev); pm_runtime_set_suspended(sensor->dev);
pm_runtime_enable(sensor->dev);
/* V4L2 subdev register */ /* V4L2 subdev register */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment