summaryrefslogtreecommitdiffstats
path: root/include/media/soc_camera.h
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/soc_camera.h
parent6f2896756c4f1d4df5bd30599e6444c9513cfe8d (diff)
downloadop-kernel-dev-9dc4e48fbea5412127ce2eb30d688c4fc55f5565.zip
op-kernel-dev-9dc4e48fbea5412127ce2eb30d688c4fc55f5565.tar.gz
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/soc_camera.h')
-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 69aba718..c886b1e 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 {
OpenPOWER on IntegriCloud