From: Laurent Pinchart Date: Fri, 16 May 2014 01:53:31 +0000 (-0300) Subject: [media] tvp5150: Replace container_of() with to_tvp5150() X-Git-Tag: firefly_0821_release~176^2~3573^2~67 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=12bd10c79bd8f65698660e992b8656e9a48eeca1;p=firefly-linux-kernel-4.4.55.git [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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- 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) 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->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; @@ -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) { - struct tvp5150 *decoder = container_of(sd, struct tvp5150, sd); + struct tvp5150 *decoder = to_tvp5150(sd); v4l2_std_id std; if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)