Commit 12bd10c7 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 0520e4cc
...@@ -913,7 +913,7 @@ static int tvp5150_s_crop(struct v4l2_subdev *sd, const struct v4l2_crop *a) ...@@ -913,7 +913,7 @@ static int tvp5150_s_crop(struct v4l2_subdev *sd, const struct v4l2_crop *a)
static int tvp5150_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) static int tvp5150_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
{ {
struct tvp5150 *decoder = container_of(sd, struct tvp5150, sd); struct tvp5150 *decoder = to_tvp5150(sd);
a->c = decoder->rect; a->c = decoder->rect;
a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 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,7 +923,7 @@ static int tvp5150_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
static int tvp5150_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) static int tvp5150_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a)
{ {
struct tvp5150 *decoder = container_of(sd, struct tvp5150, sd); struct tvp5150 *decoder = to_tvp5150(sd);
v4l2_std_id std; v4l2_std_id std;
if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment