aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-12-05 14:01:13 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-11 06:34:00 -0500
commit4c0b036db808054f10f79e9a3d7928cf90aeb186 (patch)
tree2b3021d604eb1eb31b70f589bc165ba229bb522b /include/media
parenta626f3945208af1d60d3dccf064cac3b15bc54ca (diff)
[media] V4L: soc-camera: fix compiler warnings on 64-bit platforms
On 64-bit platforms assigning a pointer to a 32-bit variable causes a compiler warning and cannot actually work. Soc-camera currently doesn't support any 64-bit systems, but such platforms can be added in the and in any case compiler warnings should be avoided. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/soc_camera.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index b1377b931eb7..5fb2c3d10c05 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -254,7 +254,7 @@ unsigned long soc_camera_apply_board_flags(struct soc_camera_link *icl,
254static inline struct video_device *soc_camera_i2c_to_vdev(const struct i2c_client *client) 254static inline struct video_device *soc_camera_i2c_to_vdev(const struct i2c_client *client)
255{ 255{
256 struct v4l2_subdev *sd = i2c_get_clientdata(client); 256 struct v4l2_subdev *sd = i2c_get_clientdata(client);
257 struct soc_camera_device *icd = (struct soc_camera_device *)sd->grp_id; 257 struct soc_camera_device *icd = v4l2_get_subdev_hostdata(sd);
258 return icd ? icd->vdev : NULL; 258 return icd ? icd->vdev : NULL;
259} 259}
260 260
@@ -279,6 +279,11 @@ static inline struct soc_camera_device *soc_camera_from_vbq(const struct videobu
279 return container_of(vq, struct soc_camera_device, vb_vidq); 279 return container_of(vq, struct soc_camera_device, vb_vidq);
280} 280}
281 281
282static inline u32 soc_camera_grp_id(const struct soc_camera_device *icd)
283{
284 return (icd->iface << 8) | (icd->devnum + 1);
285}
286
282void soc_camera_lock(struct vb2_queue *vq); 287void soc_camera_lock(struct vb2_queue *vq);
283void soc_camera_unlock(struct vb2_queue *vq); 288void soc_camera_unlock(struct vb2_queue *vq);
284 289