aboutsummaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2013-06-10 15:07:35 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-21 16:28:36 -0300
commit668773b84604926519e2baf444f382f88d799d41 (patch)
treecd41634a511a1040e2fbe62fe9227a64ce009fb7 /include/media
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/media')
-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 21fc9e16d7b..5fbb266405f 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -583,6 +583,8 @@ struct v4l2_subdev {
void *host_priv;
/* subdev device node */
struct video_device *devnode;
+ /* pointer to the physical device, if any */
+ struct device *dev;
};
#define media_entity_to_v4l2_subdev(ent) \