Message ID | 20231122043009.2741-5-laurent.pinchart+renesas@ideasonboard.com |
---|---|
State | Superseded |
Headers | show |
Series | None | expand |
Hi Laurent On Wed, Nov 22, 2023 at 06:29:54AM GMT, Laurent Pinchart wrote: > From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > The brx_get_compose() function is just a wrapper around > v4l2_subdev_state_get_compose() without any added value. Drop it and > call v4l2_subdev_state_get_compose() directly. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Thanks j > --- > drivers/media/platform/renesas/vsp1/vsp1_brx.c | 13 +++---------- > 1 file changed, 3 insertions(+), 10 deletions(-) > > diff --git a/drivers/media/platform/renesas/vsp1/vsp1_brx.c b/drivers/media/platform/renesas/vsp1/vsp1_brx.c > index 0eb4d8fe4285..05940d0427bf 100644 > --- a/drivers/media/platform/renesas/vsp1/vsp1_brx.c > +++ b/drivers/media/platform/renesas/vsp1/vsp1_brx.c > @@ -96,13 +96,6 @@ static int brx_enum_frame_size(struct v4l2_subdev *subdev, > return 0; > } > > -static struct v4l2_rect *brx_get_compose(struct vsp1_brx *brx, > - struct v4l2_subdev_state *sd_state, > - unsigned int pad) > -{ > - return v4l2_subdev_state_get_compose(sd_state, pad); > -} > - > static void brx_try_format(struct vsp1_brx *brx, > struct v4l2_subdev_state *sd_state, > unsigned int pad, struct v4l2_mbus_framefmt *fmt) > @@ -157,7 +150,7 @@ static int brx_set_format(struct v4l2_subdev *subdev, > if (fmt->pad != brx->entity.source_pad) { > struct v4l2_rect *compose; > > - compose = brx_get_compose(brx, state, fmt->pad); > + compose = v4l2_subdev_state_get_compose(state, fmt->pad); > compose->left = 0; > compose->top = 0; > compose->width = format->width; > @@ -204,7 +197,7 @@ static int brx_get_selection(struct v4l2_subdev *subdev, > return -EINVAL; > > mutex_lock(&brx->entity.lock); > - sel->r = *brx_get_compose(brx, state, sel->pad); > + sel->r = *v4l2_subdev_state_get_compose(state, sel->pad); > mutex_unlock(&brx->entity.lock); > return 0; > > @@ -253,7 +246,7 @@ static int brx_set_selection(struct v4l2_subdev *subdev, > sel->r.width = format->width; > sel->r.height = format->height; > > - compose = brx_get_compose(brx, state, sel->pad); > + compose = v4l2_subdev_state_get_compose(state, sel->pad); > *compose = sel->r; > > done: > -- > Regards, > > Laurent Pinchart > >
diff --git a/drivers/media/platform/renesas/vsp1/vsp1_brx.c b/drivers/media/platform/renesas/vsp1/vsp1_brx.c index 0eb4d8fe4285..05940d0427bf 100644 --- a/drivers/media/platform/renesas/vsp1/vsp1_brx.c +++ b/drivers/media/platform/renesas/vsp1/vsp1_brx.c @@ -96,13 +96,6 @@ static int brx_enum_frame_size(struct v4l2_subdev *subdev, return 0; } -static struct v4l2_rect *brx_get_compose(struct vsp1_brx *brx, - struct v4l2_subdev_state *sd_state, - unsigned int pad) -{ - return v4l2_subdev_state_get_compose(sd_state, pad); -} - static void brx_try_format(struct vsp1_brx *brx, struct v4l2_subdev_state *sd_state, unsigned int pad, struct v4l2_mbus_framefmt *fmt) @@ -157,7 +150,7 @@ static int brx_set_format(struct v4l2_subdev *subdev, if (fmt->pad != brx->entity.source_pad) { struct v4l2_rect *compose; - compose = brx_get_compose(brx, state, fmt->pad); + compose = v4l2_subdev_state_get_compose(state, fmt->pad); compose->left = 0; compose->top = 0; compose->width = format->width; @@ -204,7 +197,7 @@ static int brx_get_selection(struct v4l2_subdev *subdev, return -EINVAL; mutex_lock(&brx->entity.lock); - sel->r = *brx_get_compose(brx, state, sel->pad); + sel->r = *v4l2_subdev_state_get_compose(state, sel->pad); mutex_unlock(&brx->entity.lock); return 0; @@ -253,7 +246,7 @@ static int brx_set_selection(struct v4l2_subdev *subdev, sel->r.width = format->width; sel->r.height = format->height; - compose = brx_get_compose(brx, state, sel->pad); + compose = v4l2_subdev_state_get_compose(state, sel->pad); *compose = sel->r; done: