diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-05-15 21:53:31 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-23 18:51:26 -0400 |
commit | 12bd10c79bd8f65698660e992b8656e9a48eeca1 (patch) | |
tree | 5e290a38590fffaa439d957a6a66cc0e7e8b21c7 | |
parent | 0520e4cc3bb9ddc6eb7cc45d01191deee035b22a (diff) |
[media] tvp5150: Replace container_of() with to_tvp5150()
Use the driver-specific inline function to cast from a subdev pointer to
a tvp5150 pointer instead of the generic container_of().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/i2c/tvp5150.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index 4fd3688e1164..07dee4439c2f 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c | |||
@@ -913,7 +913,7 @@ static int tvp5150_s_crop(struct v4l2_subdev *sd, const struct v4l2_crop *a) | |||
913 | 913 | ||
914 | static int tvp5150_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | 914 | static int tvp5150_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) |
915 | { | 915 | { |
916 | struct tvp5150 *decoder = container_of(sd, struct tvp5150, sd); | 916 | struct tvp5150 *decoder = to_tvp5150(sd); |
917 | 917 | ||
918 | a->c = decoder->rect; | 918 | a->c = decoder->rect; |
919 | a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 919 | a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
@@ -923,7 +923,7 @@ static int tvp5150_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) | |||
923 | 923 | ||
924 | static int tvp5150_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) | 924 | static int tvp5150_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) |
925 | { | 925 | { |
926 | struct tvp5150 *decoder = container_of(sd, struct tvp5150, sd); | 926 | struct tvp5150 *decoder = to_tvp5150(sd); |
927 | v4l2_std_id std; | 927 | v4l2_std_id std; |
928 | 928 | ||
929 | if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | 929 | if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) |