aboutsummaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@pengutronix.de>2008-04-22 14:45:32 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 14:07:46 -0300
commit9dc4e48fbea5412127ce2eb30d688c4fc55f5565 (patch)
tree8b0912f884f3613922f2bba2198d6b8fc3f95691 /include/media
parent6f2896756c4f1d4df5bd30599e6444c9513cfe8d (diff)
V4L/DVB (7276): soc-camera: deactivate cameras when not used
Only attach cameras to the host interface for probing, then detach until open. This allows platforms with several cameras on an interface, physically supporting only one camera, to handle multiple cameras and activate them selectively after initial probing. The first attach during probe is needed to activate the host interface to be able to physically communicate with cameras. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/soc_camera.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 69aba7188e4..c886b1e6487 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -41,6 +41,8 @@ struct soc_camera_device {
int (*probe)(struct soc_camera_device *icd);
void (*remove)(struct soc_camera_device *icd);
struct module *owner;
+ /* soc_camera.c private count. Only accessed with video_lock held */
+ int use_count;
};
struct soc_camera_file {