diff options
author | Hans de Goede <hdegoede@redhat.com> | 2011-06-25 16:10:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:53:43 -0400 |
commit | 1a4ede65f30315a31cb9b239bec0d4bb32834691 (patch) | |
tree | 0ca98c02d5f4cb2f1d308f30ed1ff76fa4b555ed /drivers/media/video/pwc | |
parent | 885fe18f5542fe283a17f70583383c6cadcba1c3 (diff) |
[media] pwc: Fix non CodingStyle compliant 3 space indent in pwc.h
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pwc')
-rw-r--r-- | drivers/media/video/pwc/pwc.h | 131 |
1 files changed, 68 insertions, 63 deletions
diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/video/pwc/pwc.h index ae92fe211f6d..cfe82319f343 100644 --- a/drivers/media/video/pwc/pwc.h +++ b/drivers/media/video/pwc/pwc.h | |||
@@ -77,9 +77,9 @@ | |||
77 | #define PWC_DEBUG_LEVEL (PWC_DEBUG_LEVEL_MODULE) | 77 | #define PWC_DEBUG_LEVEL (PWC_DEBUG_LEVEL_MODULE) |
78 | 78 | ||
79 | #define PWC_DEBUG(level, fmt, args...) do {\ | 79 | #define PWC_DEBUG(level, fmt, args...) do {\ |
80 | if ((PWC_DEBUG_LEVEL_ ##level) & pwc_trace) \ | 80 | if ((PWC_DEBUG_LEVEL_ ##level) & pwc_trace) \ |
81 | printk(KERN_DEBUG PFX fmt, ##args); \ | 81 | printk(KERN_DEBUG PFX fmt, ##args); \ |
82 | } while(0) | 82 | } while (0) |
83 | 83 | ||
84 | #define PWC_ERROR(fmt, args...) printk(KERN_ERR PFX fmt, ##args) | 84 | #define PWC_ERROR(fmt, args...) printk(KERN_ERR PFX fmt, ##args) |
85 | #define PWC_WARNING(fmt, args...) printk(KERN_WARNING PFX fmt, ##args) | 85 | #define PWC_WARNING(fmt, args...) printk(KERN_WARNING PFX fmt, ##args) |
@@ -152,40 +152,41 @@ struct pwc_frame_buf | |||
152 | struct pwc_device | 152 | struct pwc_device |
153 | { | 153 | { |
154 | struct video_device vdev; | 154 | struct video_device vdev; |
155 | 155 | struct mutex modlock; | |
156 | /* Pointer to our usb_device, may be NULL after unplug */ | 156 | |
157 | struct usb_device *udev; | 157 | /* Pointer to our usb_device, may be NULL after unplug */ |
158 | 158 | struct usb_device *udev; | |
159 | int type; /* type of cam (645, 646, 675, 680, 690, 720, 730, 740, 750) */ | 159 | /* type of cam (645, 646, 675, 680, 690, 720, 730, 740, 750) */ |
160 | int release; /* release number */ | 160 | int type; |
161 | int features; /* feature bits */ | 161 | int release; /* release number */ |
162 | char serial[30]; /* serial number (string) */ | 162 | int features; /* feature bits */ |
163 | int error_status; /* set when something goes wrong with the cam (unplugged, USB errors) */ | 163 | char serial[30]; /* serial number (string) */ |
164 | int usb_init; /* set when the cam has been initialized over USB */ | 164 | int error_status; /* set when something goes wrong */ |
165 | 165 | int usb_init; /* set when the cam has been initialized */ | |
166 | /*** Video data ***/ | 166 | |
167 | int vopen; /* flag */ | 167 | /*** Video data ***/ |
168 | int vendpoint; /* video isoc endpoint */ | 168 | int vopen; /* flag */ |
169 | int vcinterface; /* video control interface */ | 169 | int vendpoint; /* video isoc endpoint */ |
170 | int valternate; /* alternate interface needed */ | 170 | int vcinterface; /* video control interface */ |
171 | int vframes, vsize; /* frames-per-second & size (see PSZ_*) */ | 171 | int valternate; /* alternate interface needed */ |
172 | int pixfmt; /* pixelformat: V4L2_PIX_FMT_YUV420 or raw: _PWC1, _PWC2 */ | 172 | int vframes, vsize; /* frames-per-second & size (see PSZ_*) */ |
173 | int vframe_count; /* received frames */ | 173 | int pixfmt; /* pixelformat: V4L2_PIX_FMT_YUV420 or _PWCX */ |
174 | int vmax_packet_size; /* USB maxpacket size */ | 174 | int vframe_count; /* received frames */ |
175 | int vlast_packet_size; /* for frame synchronisation */ | 175 | int vmax_packet_size; /* USB maxpacket size */ |
176 | int visoc_errors; /* number of contiguous ISOC errors */ | 176 | int vlast_packet_size; /* for frame synchronisation */ |
177 | int vcompression; /* desired compression factor */ | 177 | int visoc_errors; /* number of contiguous ISOC errors */ |
178 | int vbandlength; /* compressed band length; 0 is uncompressed */ | 178 | int vcompression; /* desired compression factor */ |
179 | char vsnapshot; /* snapshot mode */ | 179 | int vbandlength; /* compressed band length; 0 is uncompressed */ |
180 | char vsync; /* used by isoc handler */ | 180 | char vsnapshot; /* snapshot mode */ |
181 | char vmirror; /* for ToUCaM series */ | 181 | char vsync; /* used by isoc handler */ |
182 | char vmirror; /* for ToUCaM series */ | ||
182 | char unplugged; | 183 | char unplugged; |
183 | 184 | ||
184 | int cmd_len; | 185 | int cmd_len; |
185 | unsigned char cmd_buf[13]; | 186 | unsigned char cmd_buf[13]; |
186 | 187 | ||
187 | struct pwc_iso_buf sbuf[MAX_ISO_BUFS]; | 188 | struct pwc_iso_buf sbuf[MAX_ISO_BUFS]; |
188 | char iso_init; | 189 | char iso_init; |
189 | 190 | ||
190 | /* videobuf2 queue and queued buffers list */ | 191 | /* videobuf2 queue and queued buffers list */ |
191 | struct vb2_queue vb_queue; | 192 | struct vb2_queue vb_queue; |
@@ -200,39 +201,43 @@ struct pwc_device | |||
200 | */ | 201 | */ |
201 | struct pwc_frame_buf *fill_buf; | 202 | struct pwc_frame_buf *fill_buf; |
202 | 203 | ||
203 | int frame_header_size, frame_trailer_size; | 204 | int frame_header_size, frame_trailer_size; |
204 | int frame_size; | 205 | int frame_size; |
205 | int frame_total_size; /* including header & trailer */ | 206 | int frame_total_size; /* including header & trailer */ |
206 | int drop_frames; | 207 | int drop_frames; |
207 | 208 | ||
208 | void *decompress_data; /* private data for decompression engine */ | 209 | void *decompress_data; /* private data for decompression engine */ |
209 | 210 | ||
210 | /* We have an 'image' and a 'view', where 'image' is the fixed-size image | 211 | /* |
211 | as delivered by the camera, and 'view' is the size requested by the | 212 | * We have an 'image' and a 'view', where 'image' is the fixed-size img |
212 | program. The camera image is centered in this viewport, laced with | 213 | * as delivered by the camera, and 'view' is the size requested by the |
213 | a gray or black border. view_min <= image <= view <= view_max; | 214 | * program. The camera image is centered in this viewport, laced with |
214 | */ | 215 | * a gray or black border. view_min <= image <= view <= view_max; |
215 | int image_mask; /* bitmask of supported sizes */ | 216 | */ |
216 | struct pwc_coord view_min, view_max; /* minimum and maximum viewable sizes */ | 217 | int image_mask; /* supported sizes */ |
217 | struct pwc_coord abs_max; /* maximum supported size with compression */ | 218 | struct pwc_coord view_min, view_max; /* minimum and maximum view */ |
218 | struct pwc_coord image, view; /* image and viewport size */ | 219 | struct pwc_coord abs_max; /* maximum supported size */ |
219 | struct pwc_coord offset; /* offset within the viewport */ | 220 | struct pwc_coord image, view; /* image and viewport size */ |
220 | 221 | struct pwc_coord offset; /* offset of the viewport */ | |
221 | struct mutex modlock; /* to prevent races in video_open(), etc */ | 222 | |
222 | 223 | /*** motorized pan/tilt feature */ | |
223 | /*** motorized pan/tilt feature */ | 224 | struct pwc_mpt_range angle_range; |
224 | struct pwc_mpt_range angle_range; | 225 | int pan_angle; /* in degrees * 100 */ |
225 | int pan_angle; /* in degrees * 100 */ | 226 | int tilt_angle; /* absolute angle; 0,0 is home */ |
226 | int tilt_angle; /* absolute angle; 0,0 is home position */ | 227 | |
227 | int snapshot_button_status; /* set to 1 when the user push the button, reset to 0 when this value is read */ | 228 | /* |
229 | * Set to 1 when the user push the button, reset to 0 | ||
230 | * when this value is read from sysfs. | ||
231 | */ | ||
232 | int snapshot_button_status; | ||
228 | #ifdef CONFIG_USB_PWC_INPUT_EVDEV | 233 | #ifdef CONFIG_USB_PWC_INPUT_EVDEV |
229 | struct input_dev *button_dev; /* webcam snapshot button input */ | 234 | struct input_dev *button_dev; /* webcam snapshot button input */ |
230 | char button_phys[64]; | 235 | char button_phys[64]; |
231 | #endif | 236 | #endif |
232 | 237 | ||
233 | /*** Misc. data ***/ | 238 | /*** Misc. data ***/ |
234 | #if PWC_INT_PIPE | 239 | #if PWC_INT_PIPE |
235 | void *usb_int_handler; /* for the interrupt endpoint */ | 240 | void *usb_int_handler; /* for the interrupt endpoint */ |
236 | #endif | 241 | #endif |
237 | }; | 242 | }; |
238 | 243 | ||