Commit f428948b authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab

[media] m5mols: Do not reset the configured pixel format when unexpected

Initialize default pixel format in driver probe() rather than in
s_power handler. This also prevents resetting the configuration
applied before the device was powered on.
Acked-by: default avatarHeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent aa1f4601
...@@ -864,13 +864,6 @@ static int m5mols_s_power(struct v4l2_subdev *sd, int on) ...@@ -864,13 +864,6 @@ static int m5mols_s_power(struct v4l2_subdev *sd, int on)
ret = m5mols_sensor_power(info, true); ret = m5mols_sensor_power(info, true);
if (!ret) if (!ret)
ret = m5mols_fw_start(sd); ret = m5mols_fw_start(sd);
if (ret)
return ret;
info->ffmt[M5MOLS_RESTYPE_MONITOR] =
m5mols_default_ffmt[M5MOLS_RESTYPE_MONITOR];
info->ffmt[M5MOLS_RESTYPE_CAPTURE] =
m5mols_default_ffmt[M5MOLS_RESTYPE_CAPTURE];
return ret; return ret;
} }
...@@ -1007,6 +1000,8 @@ static int __devinit m5mols_probe(struct i2c_client *client, ...@@ -1007,6 +1000,8 @@ static int __devinit m5mols_probe(struct i2c_client *client,
goto out_me; goto out_me;
} }
info->res_type = M5MOLS_RESTYPE_MONITOR; info->res_type = M5MOLS_RESTYPE_MONITOR;
info->ffmt[0] = m5mols_default_ffmt[0];
info->ffmt[1] = m5mols_default_ffmt[1];
ret = m5mols_sensor_power(info, true); ret = m5mols_sensor_power(info, true);
if (ret) if (ret)
......
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