diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 16:46:43 +0200 |
---|---|---|
committer | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 16:46:43 +0200 |
commit | 1e42790cf4308ec89ea72d095fe8aa119ea43dc5 (patch) | |
tree | 9c37d5fb2b0b3a5147a1ef808518015f31e212f3 /linux/include/media/soc_camera.h | |
parent | 50dda2d882c41d334002fb2437c66080c5d87080 (diff) | |
download | mediapointer-dvb-s2-1e42790cf4308ec89ea72d095fe8aa119ea43dc5.tar.gz mediapointer-dvb-s2-1e42790cf4308ec89ea72d095fe8aa119ea43dc5.tar.bz2 |
soc-camera: put pixel format initialisation back in probe, add .put_formats()
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
The move of format translation initialisation into soc_camera_open() was
temporary for the soc-camera as platform driver intermediate step, put it back
into soc_camera_probe(). Also add a .put_formats() method to
soc_camera_host_ops to free any resources host driver might have allocated in
.get_formats().
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Priority: low
---
drivers/media/video/soc_camera.c | 50 ++++++++++++++++++++++++++-----------
include/media/soc_camera.h | 7 +++++
2 files changed, 42 insertions(+), 15 deletions(-)
Diffstat (limited to 'linux/include/media/soc_camera.h')
-rw-r--r-- | linux/include/media/soc_camera.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h index f623c010a..2b7a8c663 100644 --- a/linux/include/media/soc_camera.h +++ b/linux/include/media/soc_camera.h @@ -67,8 +67,15 @@ struct soc_camera_host_ops { void (*remove)(struct soc_camera_device *); int (*suspend)(struct soc_camera_device *, pm_message_t); int (*resume)(struct soc_camera_device *); + /* + * .get_formats() is called for each client device format, but + * .put_formats() is only called once. Further, if any of the calls to + * .get_formats() fail, .put_formats() will not be called at all, the + * failing .get_formats() must then clean up internally. + */ int (*get_formats)(struct soc_camera_device *, int, struct soc_camera_format_xlate *); + void (*put_formats)(struct soc_camera_device *); int (*set_crop)(struct soc_camera_device *, struct v4l2_rect *); int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *); int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); |