mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:24:45 +01:00
media: ov8865: move mode_configure out of state_configure
ov8865_mode_configure() only needs to be called on sensor init, but it can be called multiple times from ov8865_state_configure(). Move ov8865_mode_configure() to ov8865_sensor_init(). Signed-off-by: Allen Ballway <ballway@chromium.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
075710b670
commit
da8f23e359
1 changed files with 3 additions and 11 deletions
|
|
@ -2304,14 +2304,6 @@ static int ov8865_state_configure(struct ov8865_sensor *sensor,
|
|||
if (sensor->state.streaming)
|
||||
return -EBUSY;
|
||||
|
||||
/* State will be configured at first power on otherwise. */
|
||||
if (pm_runtime_enabled(sensor->dev) &&
|
||||
!pm_runtime_suspended(sensor->dev)) {
|
||||
ret = ov8865_mode_configure(sensor, mode, mbus_code);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = ov8865_state_mipi_configure(sensor, mode, mbus_code);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
@ -2384,10 +2376,10 @@ static int ov8865_sensor_init(struct ov8865_sensor *sensor)
|
|||
}
|
||||
|
||||
/* Configure current mode. */
|
||||
ret = ov8865_state_configure(sensor, sensor->state.mode,
|
||||
sensor->state.mbus_code);
|
||||
ret = ov8865_mode_configure(sensor, sensor->state.mode,
|
||||
sensor->state.mbus_code);
|
||||
if (ret) {
|
||||
dev_err(sensor->dev, "failed to configure state\n");
|
||||
dev_err(sensor->dev, "failed to configure mode\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue