diff options
| author | Laurent Pinchart <[email protected]> | 2023-11-27 09:07:44 +0000 |
|---|---|---|
| committer | Hans Verkuil <[email protected]> | 2023-12-04 09:37:47 +0000 |
| commit | 5755be5f15d9e651ed433e5dbf7b7b968efb3064 (patch) | |
| tree | 26e2d04608341d282595680569fc06f1853f878a /drivers/media/platform/microchip/microchip-isc-scaler.c | |
| parent | media: i2c: Add driver for THine THP7312 (diff) | |
| download | kernel-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/platform/microchip/microchip-isc-scaler.c')
| -rw-r--r-- | drivers/media/platform/microchip/microchip-isc-scaler.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/platform/microchip/microchip-isc-scaler.c b/drivers/media/platform/microchip/microchip-isc-scaler.c index 58dffbc9fbcb..e83463543e21 100644 --- a/drivers/media/platform/microchip/microchip-isc-scaler.c +++ b/drivers/media/platform/microchip/microchip-isc-scaler.c @@ -145,8 +145,8 @@ static int isc_scaler_g_sel(struct v4l2_subdev *sd, return 0; } -static int isc_scaler_init_cfg(struct v4l2_subdev *sd, - struct v4l2_subdev_state *sd_state) +static int isc_scaler_init_state(struct v4l2_subdev *sd, + struct v4l2_subdev_state *sd_state) { struct v4l2_mbus_framefmt *v4l2_try_fmt = v4l2_subdev_state_get_format(sd_state, 0); @@ -170,7 +170,6 @@ static const struct v4l2_subdev_pad_ops isc_scaler_pad_ops = { .set_fmt = isc_scaler_set_fmt, .get_fmt = isc_scaler_get_fmt, .get_selection = isc_scaler_g_sel, - .init_cfg = isc_scaler_init_cfg, }; static const struct media_entity_operations isc_scaler_entity_ops = { @@ -181,11 +180,16 @@ static const struct v4l2_subdev_ops xisc_scaler_subdev_ops = { .pad = &isc_scaler_pad_ops, }; +static const struct v4l2_subdev_internal_ops isc_scaler_internal_ops = { + .init_state = isc_scaler_init_state, +}; + int isc_scaler_init(struct isc_device *isc) { int ret; v4l2_subdev_init(&isc->scaler_sd, &xisc_scaler_subdev_ops); + isc->scaler_sd.internal_ops = &isc_scaler_internal_ops; isc->scaler_sd.owner = THIS_MODULE; isc->scaler_sd.dev = isc->dev; |
