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: 11c0d8fdcc ("media: i2c: Add support for the OV8865 image sensor")
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Daniel Scally 2021-11-23 01:00:01 +01:00 committed by Mauro Carvalho Chehab
parent 887bda2340
commit d2484fbf78
1 changed files with 1 additions and 1 deletions

View File

@ -2897,8 +2897,8 @@ static int ov8865_probe(struct i2c_client *client)
/* Runtime PM */
pm_runtime_enable(sensor->dev);
pm_runtime_set_suspended(sensor->dev);
pm_runtime_enable(sensor->dev);
/* V4L2 subdev register */