Commit 9ec2ac9b authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

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: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent ae7855a4
......@@ -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)
......
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