diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-01-30 13:16:03 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-25 11:59:29 -0400 |
commit | c269887c2da49ad55ff59217255b0e95b0cec0e9 (patch) | |
tree | 6fd1e3653fb0d0f83f177d516ed82f117aa6f17b /drivers/media/i2c | |
parent | 29fcec60d199e2cc3ac5fccd6f2a470b104d1235 (diff) |
[media] adv7604: Inline the to_sd function
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>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/adv7604.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 29bdb9ec9a7b..154790923668 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c | |||
@@ -340,11 +340,6 @@ static inline struct adv7604_state *to_state(struct v4l2_subdev *sd) | |||
340 | return container_of(sd, struct adv7604_state, sd); | 340 | return container_of(sd, struct adv7604_state, sd); |
341 | } | 341 | } |
342 | 342 | ||
343 | static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) | ||
344 | { | ||
345 | return &container_of(ctrl->handler, struct adv7604_state, hdl)->sd; | ||
346 | } | ||
347 | |||
348 | static inline unsigned hblanking(const struct v4l2_bt_timings *t) | 343 | static inline unsigned hblanking(const struct v4l2_bt_timings *t) |
349 | { | 344 | { |
350 | return V4L2_DV_BT_BLANKING_WIDTH(t); | 345 | return V4L2_DV_BT_BLANKING_WIDTH(t); |
@@ -1270,7 +1265,9 @@ static void set_rgb_quantization_range(struct v4l2_subdev *sd) | |||
1270 | 1265 | ||
1271 | static int adv7604_s_ctrl(struct v4l2_ctrl *ctrl) | 1266 | static int adv7604_s_ctrl(struct v4l2_ctrl *ctrl) |
1272 | { | 1267 | { |
1273 | struct v4l2_subdev *sd = to_sd(ctrl); | 1268 | struct v4l2_subdev *sd = |
1269 | &container_of(ctrl->handler, struct adv7604_state, hdl)->sd; | ||
1270 | |||
1274 | struct adv7604_state *state = to_state(sd); | 1271 | struct adv7604_state *state = to_state(sd); |
1275 | 1272 | ||
1276 | switch (ctrl->id) { | 1273 | switch (ctrl->id) { |