diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 10:46:43 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:18:49 -0400 |
commit | fa48984e36ee73e964eeb994a45de6525114e871 (patch) | |
tree | 733f9fd78a536209456fbc02ceac2792a2b71755 /include/media/soc_camera.h | |
parent | 0d205b6a09177cd14c109321fb40873418a11f7e (diff) |
V4L/DVB (12519): soc-camera: put pixel format initialisation back in probe, add .put_formats()
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/soc_camera.h')
-rw-r--r-- | include/media/soc_camera.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index f623c010a539..2b7a8c663605 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -67,8 +67,15 @@ struct soc_camera_host_ops { | |||
67 | void (*remove)(struct soc_camera_device *); | 67 | void (*remove)(struct soc_camera_device *); |
68 | int (*suspend)(struct soc_camera_device *, pm_message_t); | 68 | int (*suspend)(struct soc_camera_device *, pm_message_t); |
69 | int (*resume)(struct soc_camera_device *); | 69 | int (*resume)(struct soc_camera_device *); |
70 | /* | ||
71 | * .get_formats() is called for each client device format, but | ||
72 | * .put_formats() is only called once. Further, if any of the calls to | ||
73 | * .get_formats() fail, .put_formats() will not be called at all, the | ||
74 | * failing .get_formats() must then clean up internally. | ||
75 | */ | ||
70 | int (*get_formats)(struct soc_camera_device *, int, | 76 | int (*get_formats)(struct soc_camera_device *, int, |
71 | struct soc_camera_format_xlate *); | 77 | struct soc_camera_format_xlate *); |
78 | void (*put_formats)(struct soc_camera_device *); | ||
72 | int (*set_crop)(struct soc_camera_device *, struct v4l2_rect *); | 79 | int (*set_crop)(struct soc_camera_device *, struct v4l2_rect *); |
73 | int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *); | 80 | int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *); |
74 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); | 81 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); |