[PATCH v4 07/29] media: imx219: Rename "binning" as "bin_hv" in imx219_set_pad_format

Sakari Ailus
2026-04-08T15:39:54Z

Rename "binning" as "bin_hv" in anticipation of having a variable called
"binning" for another purpose.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/i2c/imx219.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index ca6a5939773d..5a85d76af65a 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -825,7 +825,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
const struct imx219_mode *mode;
struct v4l2_mbus_framefmt *format;
struct v4l2_rect *crop;
- u8 bin_h, bin_v, binning;
+ u8 bin_h, bin_v, bin_hv;
int ret;

format = v4l2_subdev_state_get_format(state, 0);
@@ -858,11 +858,11 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
bin_v = min(IMX219_VISIBLE_HEIGHT / format->height, 2U);

/* Ensure bin_h and bin_v are same to avoid 1:2 or 2:1 stretching */
- binning = min(bin_h, bin_v);
+ bin_hv = min(bin_h, bin_v);

crop = v4l2_subdev_state_get_crop(state, 0);
- crop->width = format->width * binning;
- crop->height = format->height * binning;
+ crop->width = format->width * bin_hv;
+ crop->height = format->height * bin_hv;
crop->left = (IMX219_NATIVE_WIDTH - crop->width) / 2;
crop->top = (IMX219_NATIVE_HEIGHT - crop->height) / 2;

@@ -872,15 +872,15 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,

/* Update limits and set FPS to default */
ret = __v4l2_ctrl_modify_range(imx219->vblank,
- (int)(mode->height / binning),
+ (int)(mode->height / bin_hv),
IMX219_FLL_MAX - mode->height, 1,
- (int)(mode->fll_def / binning) -
+ (int)(mode->fll_def / bin_hv) -
(int)mode->height);
if (ret)
return ret;

ret = __v4l2_ctrl_s_ctrl(imx219->vblank,
- (int)(mode->fll_def / binning) -
+ (int)(mode->fll_def / bin_hv) -
(int)mode->height);
if (ret)
return ret;
--
2.47.3