aboutsummaryrefslogtreecommitdiff
path: root/include/media/soc_camera.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-01-07 12:30:20 +0000
committerArnd Bergmann <arnd@arndb.de>2012-01-07 12:42:17 +0000
commit237c78beb8a988453bac1993d21f025d070a0d8d (patch)
tree9864f0924650770881141359a2d5bac623949789 /include/media/soc_camera.h
parent4eb821999086417ab42a15174b51497122fc406e (diff)
parent7b9dd47136c07ffd883aff6926c7b281e4c1eea4 (diff)
Merge branch 'depends/rmk/for-linus' into samsung/dt
Conflicts: arch/arm/mach-exynos/Makefile arch/arm/mach-exynos/cpu.c -> common.c arch/arm/mach-exynos/include/mach/entry-macro.S arch/arm/mach-exynos/init.c -> common.c arch/arm/mach-s5p64x0/init.c -> common.c arch/arm/mach-s5pv210/init.c -> common.c Multiple files were moved into common.c files in the rmk/for-linus branch, so this moves over the samsung/dt changes to the new files. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/media/soc_camera.h')
-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 b1377b931eb..5fb2c3d10c0 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,
static inline struct video_device *soc_camera_i2c_to_vdev(const struct i2c_client *client)
{
struct v4l2_subdev *sd = i2c_get_clientdata(client);
- struct soc_camera_device *icd = (struct soc_camera_device *)sd->grp_id;
+ struct soc_camera_device *icd = v4l2_get_subdev_hostdata(sd);
return icd ? icd->vdev : NULL;
}
@@ -279,6 +279,11 @@ static inline struct soc_camera_device *soc_camera_from_vbq(const struct videobu
return container_of(vq, struct soc_camera_device, vb_vidq);
}
+static inline u32 soc_camera_grp_id(const struct soc_camera_device *icd)
+{
+ return (icd->iface << 8) | (icd->devnum + 1);
+}
+
void soc_camera_lock(struct vb2_queue *vq);
void soc_camera_unlock(struct vb2_queue *vq);