summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-05-27 20:35:36 -0300
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>2015-02-04 11:15:40 +0100
commitdefc5a1d70c20077fc0509172f329e70eb1ab67f (patch)
tree7c6bc9f473dd83b2a077ef6e0d50bf57c401f6fb
parentedf50531d10fa8d6dc5127d572915b8dd2e581bf (diff)
downloadkernel-common-defc5a1d70c20077fc0509172f329e70eb1ab67f.tar.gz
kernel-common-defc5a1d70c20077fc0509172f329e70eb1ab67f.tar.bz2
kernel-common-defc5a1d70c20077fc0509172f329e70eb1ab67f.zip
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 <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> (cherry picked from commit 5aeb01adbea81e858318072097d98fc44578c7be) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r--drivers/media/platform/vsp1/vsp1_wpf.c3
1 files changed, 1 insertions, 2 deletions
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;