media: ccs: Give all subdevs a function
This removes a warning at driver probe time telling that one or two entities have no function set. The function used for both the binner and scaler is the scaler. 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:
parent
ae7855a4f9
commit
9ec2ac9bd0
@ -2685,7 +2685,7 @@ static void ccs_cleanup(struct ccs_sensor *sensor)
|
||||
|
||||
static void ccs_create_subdev(struct ccs_sensor *sensor,
|
||||
struct ccs_subdev *ssd, const char *name,
|
||||
unsigned short num_pads)
|
||||
unsigned short num_pads, u32 function)
|
||||
{
|
||||
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
|
||||
|
||||
@ -2696,6 +2696,7 @@ static void ccs_create_subdev(struct ccs_sensor *sensor,
|
||||
v4l2_subdev_init(&ssd->sd, &ccs_ops);
|
||||
|
||||
ssd->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
ssd->sd.entity.function = function;
|
||||
ssd->sensor = sensor;
|
||||
|
||||
ssd->npads = num_pads;
|
||||
@ -3123,11 +3124,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);
|
||||
|
||||
ccs_create_subdev(sensor, sensor->scaler, " scaler", 2);
|
||||
ccs_create_subdev(sensor, sensor->binner, " binner", 2);
|
||||
ccs_create_subdev(sensor, sensor->pixel_array, " pixel_array", 1);
|
||||
|
||||
sensor->pixel_array->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
|
||||
ccs_create_subdev(sensor, sensor->scaler, " scaler", 2,
|
||||
MEDIA_ENT_F_CAM_SENSOR);
|
||||
ccs_create_subdev(sensor, sensor->binner, " binner", 2,
|
||||
MEDIA_ENT_F_PROC_VIDEO_SCALER);
|
||||
ccs_create_subdev(sensor, sensor->pixel_array, " pixel_array", 1,
|
||||
MEDIA_ENT_F_PROC_VIDEO_SCALER);
|
||||
|
||||
rval = ccs_init_controls(sensor);
|
||||
if (rval < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user