aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/ccs/ccs-core.c
diff options
context:
space:
mode:
authorLaurent Pinchart <[email protected]>2023-11-27 09:07:44 +0000
committerHans Verkuil <[email protected]>2023-12-04 09:37:47 +0000
commit5755be5f15d9e651ed433e5dbf7b7b968efb3064 (patch)
tree26e2d04608341d282595680569fc06f1853f878a /drivers/media/i2c/ccs/ccs-core.c
parentmedia: i2c: Add driver for THine THP7312 (diff)
downloadkernel-5755be5f15d9e651ed433e5dbf7b7b968efb3064.tar.gz
kernel-5755be5f15d9e651ed433e5dbf7b7b968efb3064.zip
media: v4l2-subdev: Rename .init_cfg() operation to .init_state()
The subdev .init_cfg() operation is affected by two issues: - It has long been extended to initialize a whole v4l2_subdev_state instead of just a v4l2_subdev_pad_config, but its name has stuck around. - Despite operating on a whole subdev state and not being directly exposed to the subdev users (either in-kernel or through the userspace API), .init_cfg() is categorized as a subdev pad operation. This participates in making the subdev API confusing for new developers. Fix it by renaming the operation to .init_state(), and make it a subdev internal operation. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Michael Riesch <[email protected]> # for imx415 Acked-by: Shuah Khan <[email protected]> # for vimc Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> [Sakari Ailus: Resolved a conflict in Renesas vsp1 driver.] Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'drivers/media/i2c/ccs/ccs-core.c')
-rw-r--r--drivers/media/i2c/ccs/ccs-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c
index fb713b03ad4a..92ef98a2b951 100644
--- a/drivers/media/i2c/ccs/ccs-core.c
+++ b/drivers/media/i2c/ccs/ccs-core.c
@@ -3006,8 +3006,8 @@ static int ccs_init_subdev(struct ccs_sensor *sensor,
return 0;
}
-static int ccs_init_cfg(struct v4l2_subdev *sd,
- struct v4l2_subdev_state *sd_state)
+static int ccs_init_state(struct v4l2_subdev *sd,
+ struct v4l2_subdev_state *sd_state)
{
struct ccs_subdev *ssd = to_ccs_subdev(sd);
struct ccs_sensor *sensor = ssd->sensor;
@@ -3055,7 +3055,6 @@ static const struct v4l2_subdev_video_ops ccs_video_ops = {
};
static const struct v4l2_subdev_pad_ops ccs_pad_ops = {
- .init_cfg = ccs_init_cfg,
.enum_mbus_code = ccs_enum_mbus_code,
.get_fmt = ccs_get_format,
.set_fmt = ccs_set_format,
@@ -3079,6 +3078,7 @@ static const struct media_entity_operations ccs_entity_ops = {
};
static const struct v4l2_subdev_internal_ops ccs_internal_src_ops = {
+ .init_state = ccs_init_state,
.registered = ccs_registered,
.unregistered = ccs_unregistered,
};