aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-06-10 14:07:35 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-21 15:28:36 -0400
commit668773b84604926519e2baf444f382f88d799d41 (patch)
treecd41634a511a1040e2fbe62fe9227a64ce009fb7 /include
parentff5430de70e8137daccecfa1211509f95fcc8d25 (diff)
[media] V4L2: add a device pointer to struct v4l2_subdev
It is often useful to have simple means to get from a subdevice to the underlying physical device. This patch adds such a pointer to struct v4l2_subdev and sets it accordingly in the I2C and SPI cases. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/media/v4l2-subdev.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 21fc9e16d7be..5fbb266405f9 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -583,6 +583,8 @@ struct v4l2_subdev {
583 void *host_priv; 583 void *host_priv;
584 /* subdev device node */ 584 /* subdev device node */
585 struct video_device *devnode; 585 struct video_device *devnode;
586 /* pointer to the physical device, if any */
587 struct device *dev;
586}; 588};
587 589
588#define media_entity_to_v4l2_subdev(ent) \ 590#define media_entity_to_v4l2_subdev(ent) \