diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 10:53:23 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:19:20 -0400 |
commit | 96c75399544838e1752001c8abdde36dd459cf8f (patch) | |
tree | ad2dfa46e1f83d3b9b3de07f835618b15b90b0a5 /include/media | |
parent | a4c56fd8892e51d675f7665ddee4fd9d7e5c2cc3 (diff) |
V4L/DVB (12536): soc-camera: remove .gain and .exposure struct soc_camera_device members
This makes the soc-camera interface for V4L2 subdevices thinner yet. Handle
gain and exposure internally in each driver just like all other controls.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/soc_camera.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index f95cc4a2d9af..3d74e60032dd 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -27,8 +27,6 @@ struct soc_camera_device { | |||
27 | unsigned short width_min; | 27 | unsigned short width_min; |
28 | unsigned short height_min; | 28 | unsigned short height_min; |
29 | unsigned short y_skip_top; /* Lines to skip at the top */ | 29 | unsigned short y_skip_top; /* Lines to skip at the top */ |
30 | unsigned short gain; | ||
31 | unsigned short exposure; | ||
32 | unsigned char iface; /* Host number */ | 30 | unsigned char iface; /* Host number */ |
33 | unsigned char devnum; /* Device number per host */ | 31 | unsigned char devnum; /* Device number per host */ |
34 | unsigned char buswidth; /* See comment in .c */ | 32 | unsigned char buswidth; /* See comment in .c */ |
@@ -128,29 +126,34 @@ struct soc_camera_link { | |||
128 | void (*free_bus)(struct soc_camera_link *); | 126 | void (*free_bus)(struct soc_camera_link *); |
129 | }; | 127 | }; |
130 | 128 | ||
131 | static inline struct soc_camera_device *to_soc_camera_dev(const struct device *dev) | 129 | static inline struct soc_camera_device *to_soc_camera_dev( |
130 | const struct device *dev) | ||
132 | { | 131 | { |
133 | return container_of(dev, struct soc_camera_device, dev); | 132 | return container_of(dev, struct soc_camera_device, dev); |
134 | } | 133 | } |
135 | 134 | ||
136 | static inline struct soc_camera_host *to_soc_camera_host(const struct device *dev) | 135 | static inline struct soc_camera_host *to_soc_camera_host( |
136 | const struct device *dev) | ||
137 | { | 137 | { |
138 | struct v4l2_device *v4l2_dev = dev_get_drvdata(dev); | 138 | struct v4l2_device *v4l2_dev = dev_get_drvdata(dev); |
139 | 139 | ||
140 | return container_of(v4l2_dev, struct soc_camera_host, v4l2_dev); | 140 | return container_of(v4l2_dev, struct soc_camera_host, v4l2_dev); |
141 | } | 141 | } |
142 | 142 | ||
143 | static inline struct soc_camera_link *to_soc_camera_link(const struct soc_camera_device *icd) | 143 | static inline struct soc_camera_link *to_soc_camera_link( |
144 | const struct soc_camera_device *icd) | ||
144 | { | 145 | { |
145 | return icd->dev.platform_data; | 146 | return icd->dev.platform_data; |
146 | } | 147 | } |
147 | 148 | ||
148 | static inline struct device *to_soc_camera_control(const struct soc_camera_device *icd) | 149 | static inline struct device *to_soc_camera_control( |
150 | const struct soc_camera_device *icd) | ||
149 | { | 151 | { |
150 | return dev_get_drvdata(&icd->dev); | 152 | return dev_get_drvdata(&icd->dev); |
151 | } | 153 | } |
152 | 154 | ||
153 | static inline struct v4l2_subdev *soc_camera_to_subdev(const struct soc_camera_device *icd) | 155 | static inline struct v4l2_subdev *soc_camera_to_subdev( |
156 | const struct soc_camera_device *icd) | ||
154 | { | 157 | { |
155 | struct device *control = to_soc_camera_control(icd); | 158 | struct device *control = to_soc_camera_control(icd); |
156 | return dev_get_drvdata(control); | 159 | return dev_get_drvdata(control); |