From 68f9dbd45264796ec356a4162cb1299a31c82101 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 25 Feb 2008 12:12:17 +0000 Subject: soc-camera: deactivate cameras when not used From: Guennadi Liakhovetski 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 Signed-off-by: Mauro Carvalho Chehab --- linux/include/media/soc_camera.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux/include/media') diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h index 69aba7188..c886b1e64 100644 --- a/linux/include/media/soc_camera.h +++ b/linux/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 { -- cgit v1.2.3