From: Laurent Pinchart Date: Tue, 27 May 2014 23:35:36 +0000 (-0300) Subject: [media] v4l: vsp1: wpf: Simplify cast to pipeline structure X-Git-Tag: firefly_0821_release~176^2~2474^2~1274 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5aeb01adbea81e858318072097d98fc44578c7be;p=firefly-linux-kernel-4.4.55.git [media] v4l: vsp1: wpf: Simplify cast to pipeline structure Use the subdev pointer directly to_vsp1_pipeline() macro instead of casting from the subdev to the wpf object and back to the subdev. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c index 36c479362f8c..591f09ca3aff 100644 --- a/drivers/media/platform/vsp1/vsp1_wpf.c +++ b/drivers/media/platform/vsp1/vsp1_wpf.c @@ -44,9 +44,8 @@ static inline void vsp1_wpf_write(struct vsp1_rwpf *wpf, u32 reg, u32 data) static int wpf_s_stream(struct v4l2_subdev *subdev, int enable) { + struct vsp1_pipeline *pipe = to_vsp1_pipeline(&subdev->entity); struct vsp1_rwpf *wpf = to_rwpf(subdev); - struct vsp1_pipeline *pipe = - to_vsp1_pipeline(&wpf->entity.subdev.entity); struct vsp1_device *vsp1 = wpf->entity.vsp1; const struct v4l2_rect *crop = &wpf->crop; unsigned int i;