On Mon Jun 29 12:51:47 2026 +0200, Benjamin Mugnier wrote:
> vd55g1_update_pad_fmt() is called in vd55g1_init_state(). But
> vd55g1_set_pad_fmt(), called at the end of vd55g1_init_state(), also
> calls vd55g1_update_pad_fmt() itself.
> 
> Enhance readability and clear confusion by only preparing the format in
> vd55g1_init_state() and let vd55g1_set_pad_fmt() update it instead,
> effectively calling it only 1 time instead of 2.
> 
> Reviewed-by: Jacopo Mondi <[email protected]>
> Signed-off-by: Benjamin Mugnier <[email protected]>
> Signed-off-by: Sakari Ailus <[email protected]>

Patch committed.

Thanks,
Sakari Ailus

 drivers/media/i2c/vd55g1.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

---

diff --git a/drivers/media/i2c/vd55g1.c b/drivers/media/i2c/vd55g1.c
index fceb437e19be..22464fe31562 100644
--- a/drivers/media/i2c/vd55g1.c
+++ b/drivers/media/i2c/vd55g1.c
@@ -1365,9 +1365,9 @@ static int vd55g1_init_state(struct v4l2_subdev *sd,
                code = vd55g1_mbus_formats_mono[0];
        else
                code = vd55g1_mbus_formats_bayer[0][0];
-       vd55g1_update_pad_fmt(sensor,
-                             &vd55g1_supported_modes[VD55G1_MODE_IDX_DEF],
-                             vd55g1_get_fmt_code(sensor, code), &fmt.format);
+       fmt.format.code = vd55g1_get_fmt_code(sensor, code);
+       fmt.format.width = vd55g1_supported_modes[VD55G1_MODE_IDX_DEF].width;
+       fmt.format.height = vd55g1_supported_modes[VD55G1_MODE_IDX_DEF].height;
 
        return vd55g1_set_pad_fmt(sd, sd_state, &fmt);
 }
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to