media: v4l: subdev: Remove stream-unaware sub-device state access
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 13 Oct 2023 08:09:21 +0000 (10:09 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 23 Nov 2023 17:58:38 +0000 (18:58 +0100)
Remove stream-unaware sub-device state access functions and macros. These
are no longer used.

[Sakari Ailus: Resolve a minor conflict in removed code.]

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
include/media/v4l2-subdev.h

index 80744d87bae41d68c048f0df87e5ad0f1ea93c06..2a438e5160958c118c3804b145e8b87104e500a0 100644 (file)
@@ -1137,83 +1137,6 @@ struct v4l2_subdev_fh {
 #define to_v4l2_subdev_fh(fh)  \
        container_of(fh, struct v4l2_subdev_fh, vfh)
 
-#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
-
-/**
- * v4l2_subdev_get_pad_format - ancillary routine to get
- *     &struct v4l2_subdev_pad_config->format
- *
- * @sd: pointer to &struct v4l2_subdev
- * @state: pointer to &struct v4l2_subdev_state
- * @pad: index of the pad in the &struct v4l2_subdev_state->pads array
- */
-static inline struct v4l2_mbus_framefmt *
-v4l2_subdev_get_pad_format(struct v4l2_subdev *sd,
-                          struct v4l2_subdev_state *state,
-                          unsigned int pad)
-{
-       if (WARN_ON(!state))
-               return NULL;
-       if (WARN_ON(pad >= sd->entity.num_pads))
-               pad = 0;
-       return &state->pads[pad].format;
-}
-
-/**
- * v4l2_subdev_get_pad_crop - ancillary routine to get
- *     &struct v4l2_subdev_pad_config->crop
- *
- * @sd: pointer to &struct v4l2_subdev
- * @state: pointer to &struct v4l2_subdev_state.
- * @pad: index of the pad in the &struct v4l2_subdev_state->pads array.
- */
-static inline struct v4l2_rect *
-v4l2_subdev_get_pad_crop(struct v4l2_subdev *sd,
-                        struct v4l2_subdev_state *state,
-                        unsigned int pad)
-{
-       if (WARN_ON(!state))
-               return NULL;
-       if (WARN_ON(pad >= sd->entity.num_pads))
-               pad = 0;
-       return &state->pads[pad].crop;
-}
-
-/**
- * v4l2_subdev_get_pad_compose - ancillary routine to get
- *     &struct v4l2_subdev_pad_config->compose
- *
- * @sd: pointer to &struct v4l2_subdev
- * @state: pointer to &struct v4l2_subdev_state.
- * @pad: index of the pad in the &struct v4l2_subdev_state->pads array.
- */
-static inline struct v4l2_rect *
-v4l2_subdev_get_pad_compose(struct v4l2_subdev *sd,
-                           struct v4l2_subdev_state *state,
-                           unsigned int pad)
-{
-       if (WARN_ON(!state))
-               return NULL;
-       if (WARN_ON(pad >= sd->entity.num_pads))
-               pad = 0;
-       return &state->pads[pad].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 */
-
 extern const struct v4l2_file_operations v4l2_subdev_fops;
 
 /**