mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 23:21:31 +00:00
media: ccs: Obtain media bus formats before initialising up sub-devices
The available mbus codes will soon be needed earlier, at the time sub-devices are initialisaed. This is due to calling init_cfg() op via the v4l2_subdev_init_finalize(). Move ccs_get_mbus_formats() before ccs_init_subdev() calls. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
parent
77ab9dc8d9
commit
f00a1572b6
@ -3553,6 +3553,12 @@ static int ccs_probe(struct i2c_client *client)
|
||||
sensor->pll.ext_clk_freq_hz = sensor->hwcfg.ext_clk;
|
||||
sensor->pll.scale_n = CCS_LIM(sensor, SCALER_N_MIN);
|
||||
|
||||
rval = ccs_get_mbus_formats(sensor);
|
||||
if (rval) {
|
||||
rval = -ENODEV;
|
||||
goto out_cleanup;
|
||||
}
|
||||
|
||||
rval = ccs_init_subdev(sensor, sensor->scaler, " scaler", 2,
|
||||
MEDIA_ENT_F_PROC_VIDEO_SCALER);
|
||||
if (rval)
|
||||
@ -3574,12 +3580,6 @@ static int ccs_probe(struct i2c_client *client)
|
||||
if (rval)
|
||||
goto out_cleanup;
|
||||
|
||||
rval = ccs_get_mbus_formats(sensor);
|
||||
if (rval) {
|
||||
rval = -ENODEV;
|
||||
goto out_cleanup;
|
||||
}
|
||||
|
||||
rval = ccs_init_late_controls(sensor);
|
||||
if (rval) {
|
||||
rval = -ENODEV;
|
||||
|
Loading…
Reference in New Issue
Block a user