Commit 2f91838c authored by Tomi Valkeinen's avatar Tomi Valkeinen Committed by Mauro Carvalho Chehab

media: subdev: rename v4l2_subdev_get_pad_* helpers

The subdev state is now used for both try and active cases. Rename
rename v4l2_subdev_get_try_* helpers to v4l2_subdev_get_pad_*.

Temporary wapper helper macros are added to keep the drivers using
v4l2_subdev_get_try_* compiling. The next step is to change the uses
in th drivers, and then drop the helpers.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent f69952a4
...@@ -989,7 +989,7 @@ struct v4l2_subdev_fh { ...@@ -989,7 +989,7 @@ struct v4l2_subdev_fh {
#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) #if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
/** /**
* v4l2_subdev_get_try_format - ancillary routine to call * v4l2_subdev_get_pad_format - ancillary routine to call
* &struct v4l2_subdev_pad_config->try_fmt * &struct v4l2_subdev_pad_config->try_fmt
* *
* @sd: pointer to &struct v4l2_subdev * @sd: pointer to &struct v4l2_subdev
...@@ -997,7 +997,7 @@ struct v4l2_subdev_fh { ...@@ -997,7 +997,7 @@ struct v4l2_subdev_fh {
* @pad: index of the pad in the &struct v4l2_subdev_state->pads array * @pad: index of the pad in the &struct v4l2_subdev_state->pads array
*/ */
static inline struct v4l2_mbus_framefmt * static inline struct v4l2_mbus_framefmt *
v4l2_subdev_get_try_format(struct v4l2_subdev *sd, v4l2_subdev_get_pad_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state, struct v4l2_subdev_state *state,
unsigned int pad) unsigned int pad)
{ {
...@@ -1007,7 +1007,7 @@ v4l2_subdev_get_try_format(struct v4l2_subdev *sd, ...@@ -1007,7 +1007,7 @@ v4l2_subdev_get_try_format(struct v4l2_subdev *sd,
} }
/** /**
* v4l2_subdev_get_try_crop - ancillary routine to call * v4l2_subdev_get_pad_crop - ancillary routine to call
* &struct v4l2_subdev_pad_config->try_crop * &struct v4l2_subdev_pad_config->try_crop
* *
* @sd: pointer to &struct v4l2_subdev * @sd: pointer to &struct v4l2_subdev
...@@ -1015,7 +1015,7 @@ v4l2_subdev_get_try_format(struct v4l2_subdev *sd, ...@@ -1015,7 +1015,7 @@ v4l2_subdev_get_try_format(struct v4l2_subdev *sd,
* @pad: index of the pad in the &struct v4l2_subdev_state->pads array. * @pad: index of the pad in the &struct v4l2_subdev_state->pads array.
*/ */
static inline struct v4l2_rect * static inline struct v4l2_rect *
v4l2_subdev_get_try_crop(struct v4l2_subdev *sd, v4l2_subdev_get_pad_crop(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state, struct v4l2_subdev_state *state,
unsigned int pad) unsigned int pad)
{ {
...@@ -1025,7 +1025,7 @@ v4l2_subdev_get_try_crop(struct v4l2_subdev *sd, ...@@ -1025,7 +1025,7 @@ v4l2_subdev_get_try_crop(struct v4l2_subdev *sd,
} }
/** /**
* v4l2_subdev_get_try_compose - ancillary routine to call * v4l2_subdev_get_pad_compose - ancillary routine to call
* &struct v4l2_subdev_pad_config->try_compose * &struct v4l2_subdev_pad_config->try_compose
* *
* @sd: pointer to &struct v4l2_subdev * @sd: pointer to &struct v4l2_subdev
...@@ -1033,7 +1033,7 @@ v4l2_subdev_get_try_crop(struct v4l2_subdev *sd, ...@@ -1033,7 +1033,7 @@ v4l2_subdev_get_try_crop(struct v4l2_subdev *sd,
* @pad: index of the pad in the &struct v4l2_subdev_state->pads array. * @pad: index of the pad in the &struct v4l2_subdev_state->pads array.
*/ */
static inline struct v4l2_rect * static inline struct v4l2_rect *
v4l2_subdev_get_try_compose(struct v4l2_subdev *sd, v4l2_subdev_get_pad_compose(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state, struct v4l2_subdev_state *state,
unsigned int pad) unsigned int pad)
{ {
...@@ -1042,6 +1042,19 @@ v4l2_subdev_get_try_compose(struct v4l2_subdev *sd, ...@@ -1042,6 +1042,19 @@ v4l2_subdev_get_try_compose(struct v4l2_subdev *sd,
return &state->pads[pad].try_compose; return &state->pads[pad].try_compose;
} }
/*
* Temprary helpers until uses of v4l2_subdev_get_try_* functions have been
* renamed
*/
#define v4l2_subdev_get_try_format(sd, state, pad) \
v4l2_subdev_get_pad_format(sd, state, pad)
#define v4l2_subdev_get_try_crop(sd, state, pad) \
v4l2_subdev_get_pad_crop(sd, state, pad)
#define v4l2_subdev_get_try_compose(sd, state, pad) \
v4l2_subdev_get_pad_compose(sd, state, pad)
#endif /* CONFIG_VIDEO_V4L2_SUBDEV_API */ #endif /* CONFIG_VIDEO_V4L2_SUBDEV_API */
extern const struct v4l2_file_operations v4l2_subdev_fops; extern const struct v4l2_file_operations v4l2_subdev_fops;
......
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