Commit bf313f99 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Hans Verkuil

media: i2c: imx219: Name all subdev state variables 'state'

Subdev state variables are named with a mix of 'state' and 'sd_state'
through the driver. To improve consistency, name them all 'state'.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 0af46fbc
...@@ -774,7 +774,7 @@ static void imx219_update_pad_format(struct imx219 *imx219, ...@@ -774,7 +774,7 @@ static void imx219_update_pad_format(struct imx219 *imx219,
} }
static int imx219_enum_mbus_code(struct v4l2_subdev *sd, static int imx219_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state, struct v4l2_subdev_state *state,
struct v4l2_subdev_mbus_code_enum *code) struct v4l2_subdev_mbus_code_enum *code)
{ {
struct imx219 *imx219 = to_imx219(sd); struct imx219 *imx219 = to_imx219(sd);
...@@ -788,7 +788,7 @@ static int imx219_enum_mbus_code(struct v4l2_subdev *sd, ...@@ -788,7 +788,7 @@ static int imx219_enum_mbus_code(struct v4l2_subdev *sd,
} }
static int imx219_enum_frame_size(struct v4l2_subdev *sd, static int imx219_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state, struct v4l2_subdev_state *state,
struct v4l2_subdev_frame_size_enum *fse) struct v4l2_subdev_frame_size_enum *fse)
{ {
struct imx219 *imx219 = to_imx219(sd); struct imx219 *imx219 = to_imx219(sd);
...@@ -810,7 +810,7 @@ static int imx219_enum_frame_size(struct v4l2_subdev *sd, ...@@ -810,7 +810,7 @@ static int imx219_enum_frame_size(struct v4l2_subdev *sd,
} }
static int imx219_set_pad_format(struct v4l2_subdev *sd, static int imx219_set_pad_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state, struct v4l2_subdev_state *state,
struct v4l2_subdev_format *fmt) struct v4l2_subdev_format *fmt)
{ {
struct imx219 *imx219 = to_imx219(sd); struct imx219 *imx219 = to_imx219(sd);
...@@ -827,7 +827,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd, ...@@ -827,7 +827,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
imx219_update_pad_format(imx219, mode, &fmt->format, fmt->format.code); imx219_update_pad_format(imx219, mode, &fmt->format, fmt->format.code);
format = v4l2_subdev_get_pad_format(sd, sd_state, 0); format = v4l2_subdev_get_pad_format(sd, state, 0);
*format = fmt->format; *format = fmt->format;
/* /*
...@@ -837,7 +837,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd, ...@@ -837,7 +837,7 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
bin_h = min(IMX219_PIXEL_ARRAY_WIDTH / format->width, 2U); bin_h = min(IMX219_PIXEL_ARRAY_WIDTH / format->width, 2U);
bin_v = min(IMX219_PIXEL_ARRAY_HEIGHT / format->height, 2U); bin_v = min(IMX219_PIXEL_ARRAY_HEIGHT / format->height, 2U);
crop = v4l2_subdev_get_pad_crop(sd, sd_state, 0); crop = v4l2_subdev_get_pad_crop(sd, state, 0);
crop->width = format->width * bin_h; crop->width = format->width * bin_h;
crop->height = format->height * bin_v; crop->height = format->height * bin_v;
crop->left = (IMX219_NATIVE_WIDTH - crop->width) / 2; crop->left = (IMX219_NATIVE_WIDTH - crop->width) / 2;
...@@ -872,12 +872,12 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd, ...@@ -872,12 +872,12 @@ static int imx219_set_pad_format(struct v4l2_subdev *sd,
} }
static int imx219_get_selection(struct v4l2_subdev *sd, static int imx219_get_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state, struct v4l2_subdev_state *state,
struct v4l2_subdev_selection *sel) struct v4l2_subdev_selection *sel)
{ {
switch (sel->target) { switch (sel->target) {
case V4L2_SEL_TGT_CROP: { case V4L2_SEL_TGT_CROP: {
sel->r = *v4l2_subdev_get_pad_crop(sd, sd_state, 0); sel->r = *v4l2_subdev_get_pad_crop(sd, state, 0);
return 0; return 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