mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 10:01:41 +00:00
media: ti: cal: rename sd_state to state
Rename 'sd_state' parameters to 'state'. There are no other states, so there is no ambiguity. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
2a50e8d75a
commit
b1b93d36c3
@ -622,12 +622,12 @@ static inline struct cal_camerarx *to_cal_camerarx(struct v4l2_subdev *sd)
|
||||
|
||||
static struct v4l2_mbus_framefmt *
|
||||
cal_camerarx_get_pad_format(struct cal_camerarx *phy,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_state *state,
|
||||
unsigned int pad, u32 which)
|
||||
{
|
||||
switch (which) {
|
||||
case V4L2_SUBDEV_FORMAT_TRY:
|
||||
return v4l2_subdev_get_try_format(&phy->subdev, sd_state, pad);
|
||||
return v4l2_subdev_get_try_format(&phy->subdev, state, pad);
|
||||
case V4L2_SUBDEV_FORMAT_ACTIVE:
|
||||
return &phy->formats[pad];
|
||||
default:
|
||||
@ -653,7 +653,7 @@ static int cal_camerarx_sd_s_stream(struct v4l2_subdev *sd, int enable)
|
||||
}
|
||||
|
||||
static int cal_camerarx_sd_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 cal_camerarx *phy = to_cal_camerarx(sd);
|
||||
@ -670,7 +670,7 @@ static int cal_camerarx_sd_enum_mbus_code(struct v4l2_subdev *sd,
|
||||
goto out;
|
||||
}
|
||||
|
||||
fmt = cal_camerarx_get_pad_format(phy, sd_state,
|
||||
fmt = cal_camerarx_get_pad_format(phy, state,
|
||||
CAL_CAMERARX_PAD_SINK,
|
||||
code->which);
|
||||
code->code = fmt->code;
|
||||
@ -690,7 +690,7 @@ out:
|
||||
}
|
||||
|
||||
static int cal_camerarx_sd_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 cal_camerarx *phy = to_cal_camerarx(sd);
|
||||
@ -706,7 +706,7 @@ static int cal_camerarx_sd_enum_frame_size(struct v4l2_subdev *sd,
|
||||
if (cal_rx_pad_is_source(fse->pad)) {
|
||||
struct v4l2_mbus_framefmt *fmt;
|
||||
|
||||
fmt = cal_camerarx_get_pad_format(phy, sd_state,
|
||||
fmt = cal_camerarx_get_pad_format(phy, state,
|
||||
CAL_CAMERARX_PAD_SINK,
|
||||
fse->which);
|
||||
if (fse->code != fmt->code) {
|
||||
@ -738,7 +738,7 @@ out:
|
||||
}
|
||||
|
||||
static int cal_camerarx_sd_get_fmt(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_state *state,
|
||||
struct v4l2_subdev_format *format)
|
||||
{
|
||||
struct cal_camerarx *phy = to_cal_camerarx(sd);
|
||||
@ -746,7 +746,7 @@ static int cal_camerarx_sd_get_fmt(struct v4l2_subdev *sd,
|
||||
|
||||
mutex_lock(&phy->mutex);
|
||||
|
||||
fmt = cal_camerarx_get_pad_format(phy, sd_state, format->pad,
|
||||
fmt = cal_camerarx_get_pad_format(phy, state, format->pad,
|
||||
format->which);
|
||||
format->format = *fmt;
|
||||
|
||||
@ -756,7 +756,7 @@ static int cal_camerarx_sd_get_fmt(struct v4l2_subdev *sd,
|
||||
}
|
||||
|
||||
static int cal_camerarx_sd_set_fmt(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state,
|
||||
struct v4l2_subdev_state *state,
|
||||
struct v4l2_subdev_format *format)
|
||||
{
|
||||
struct cal_camerarx *phy = to_cal_camerarx(sd);
|
||||
@ -766,7 +766,7 @@ static int cal_camerarx_sd_set_fmt(struct v4l2_subdev *sd,
|
||||
|
||||
/* No transcoding, source and sink formats must match. */
|
||||
if (cal_rx_pad_is_source(format->pad))
|
||||
return cal_camerarx_sd_get_fmt(sd, sd_state, format);
|
||||
return cal_camerarx_sd_get_fmt(sd, state, format);
|
||||
|
||||
/*
|
||||
* Default to the first format if the requested media bus code isn't
|
||||
@ -792,12 +792,12 @@ static int cal_camerarx_sd_set_fmt(struct v4l2_subdev *sd,
|
||||
|
||||
mutex_lock(&phy->mutex);
|
||||
|
||||
fmt = cal_camerarx_get_pad_format(phy, sd_state,
|
||||
fmt = cal_camerarx_get_pad_format(phy, state,
|
||||
CAL_CAMERARX_PAD_SINK,
|
||||
format->which);
|
||||
*fmt = format->format;
|
||||
|
||||
fmt = cal_camerarx_get_pad_format(phy, sd_state,
|
||||
fmt = cal_camerarx_get_pad_format(phy, state,
|
||||
CAL_CAMERARX_PAD_FIRST_SOURCE,
|
||||
format->which);
|
||||
*fmt = format->format;
|
||||
@ -808,10 +808,10 @@ static int cal_camerarx_sd_set_fmt(struct v4l2_subdev *sd,
|
||||
}
|
||||
|
||||
static int cal_camerarx_sd_init_cfg(struct v4l2_subdev *sd,
|
||||
struct v4l2_subdev_state *sd_state)
|
||||
struct v4l2_subdev_state *state)
|
||||
{
|
||||
struct v4l2_subdev_format format = {
|
||||
.which = sd_state ? V4L2_SUBDEV_FORMAT_TRY
|
||||
.which = state ? V4L2_SUBDEV_FORMAT_TRY
|
||||
: V4L2_SUBDEV_FORMAT_ACTIVE,
|
||||
.pad = CAL_CAMERARX_PAD_SINK,
|
||||
.format = {
|
||||
@ -826,7 +826,7 @@ static int cal_camerarx_sd_init_cfg(struct v4l2_subdev *sd,
|
||||
},
|
||||
};
|
||||
|
||||
return cal_camerarx_sd_set_fmt(sd, sd_state, &format);
|
||||
return cal_camerarx_sd_set_fmt(sd, state, &format);
|
||||
}
|
||||
|
||||
static const struct v4l2_subdev_video_ops cal_camerarx_video_ops = {
|
||||
|
Loading…
Reference in New Issue
Block a user