diff options
author | Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> | 2008-04-22 13:45:32 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:07:46 -0400 |
commit | 9dc4e48fbea5412127ce2eb30d688c4fc55f5565 (patch) | |
tree | 8b0912f884f3613922f2bba2198d6b8fc3f95691 /include/media | |
parent | 6f2896756c4f1d4df5bd30599e6444c9513cfe8d (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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 69aba7188e44..c886b1e64872 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -41,6 +41,8 @@ struct soc_camera_device { | |||
41 | int (*probe)(struct soc_camera_device *icd); | 41 | int (*probe)(struct soc_camera_device *icd); |
42 | void (*remove)(struct soc_camera_device *icd); | 42 | void (*remove)(struct soc_camera_device *icd); |
43 | struct module *owner; | 43 | struct module *owner; |
44 | /* soc_camera.c private count. Only accessed with video_lock held */ | ||
45 | int use_count; | ||
44 | }; | 46 | }; |
45 | 47 | ||
46 | struct soc_camera_file { | 48 | struct soc_camera_file { |