Skip to content

Commit

Permalink
[media] adv7604: Inline the to_sd function
Browse files Browse the repository at this point in the history
This one line function is called in a single location. Inline it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed May 25, 2014
1 parent 29fcec6 commit c269887
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/media/i2c/adv7604.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,6 @@ static inline struct adv7604_state *to_state(struct v4l2_subdev *sd)
return container_of(sd, struct adv7604_state, sd);
}

static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl)
{
return &container_of(ctrl->handler, struct adv7604_state, hdl)->sd;
}

static inline unsigned hblanking(const struct v4l2_bt_timings *t)
{
return V4L2_DV_BT_BLANKING_WIDTH(t);
Expand Down Expand Up @@ -1270,7 +1265,9 @@ static void set_rgb_quantization_range(struct v4l2_subdev *sd)

static int adv7604_s_ctrl(struct v4l2_ctrl *ctrl)
{
struct v4l2_subdev *sd = to_sd(ctrl);
struct v4l2_subdev *sd =
&container_of(ctrl->handler, struct adv7604_state, hdl)->sd;

struct adv7604_state *state = to_state(sd);

switch (ctrl->id) {
Expand Down

0 comments on commit c269887

Please sign in to comment.