The patch number 9241 was added via Guennadi Liakhovetski <[EMAIL PROTECTED]> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel If anyone has any objections, please let us know by sending a message to: [EMAIL PROTECTED] ------ soc-camera: move sensor power management to soc_camera_platform.c Switching sensors on and off is now done by sensor drivers themselves, typically using platform-provided hooks. Update soc_camera_platform.c to do the same. Also remove a refundant struct soc_camera_platform_info definition from soc_camera_platform.c. Signed-off-by: Guennadi Liakhovetski <[EMAIL PROTECTED]> Tested-by: Magnus Damm <[EMAIL PROTECTED]> --- linux/drivers/media/video/soc_camera_platform.c | 20 +++++++++++--------- linux/include/media/soc_camera_platform.h | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) --- linux/drivers/media/video/soc_camera_platform.c | 20 ++++++++-------- linux/include/media/soc_camera_platform.h | 1 2 files changed, 12 insertions(+), 9 deletions(-) diff -r 96f54ec13e19 -r 61bb2f924c88 linux/drivers/media/video/soc_camera_platform.c --- a/linux/drivers/media/video/soc_camera_platform.c Wed Oct 15 22:02:21 2008 -0200 +++ b/linux/drivers/media/video/soc_camera_platform.c Fri Oct 17 00:49:27 2008 +0200 @@ -18,15 +18,7 @@ #include <linux/videodev2.h> #include <media/v4l2-common.h> #include <media/soc_camera.h> - -struct soc_camera_platform_info { - int iface; - char *format_name; - unsigned long format_depth; - struct v4l2_pix_format format; - unsigned long bus_param; - int (*set_capture)(struct soc_camera_platform_info *info, int enable); -}; +#include <media/soc_camera_platform.h> struct soc_camera_platform_priv { struct soc_camera_platform_info *info; @@ -44,11 +36,21 @@ soc_camera_platform_get_info(struct soc_ static int soc_camera_platform_init(struct soc_camera_device *icd) { + struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd); + + if (p->power) + p->power(1); + return 0; } static int soc_camera_platform_release(struct soc_camera_device *icd) { + struct soc_camera_platform_info *p = soc_camera_platform_get_info(icd); + + if (p->power) + p->power(0); + return 0; } diff -r 96f54ec13e19 -r 61bb2f924c88 linux/include/media/soc_camera_platform.h --- a/linux/include/media/soc_camera_platform.h Wed Oct 15 22:02:21 2008 -0200 +++ b/linux/include/media/soc_camera_platform.h Fri Oct 17 00:49:27 2008 +0200 @@ -9,6 +9,7 @@ struct soc_camera_platform_info { unsigned long format_depth; struct v4l2_pix_format format; unsigned long bus_param; + void (*power)(int); int (*set_capture)(struct soc_camera_platform_info *info, int enable); }; --- Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/61bb2f924c883bf4c4dc841238a8e997ee9a36f0 _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits