diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-25 07:19:53 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-25 07:29:23 -0500 |
commit | d56410e0a594150c5ca06319da7bc8901c4d455e (patch) | |
tree | f1462651ac1bcc5cec48219dbb422ac615231423 /drivers/media/video/usbvideo/konicawc.c | |
parent | 9f6933be665ce3b049c274c99810ac754edabf19 (diff) |
V4L/DVB (3599b): Whitespace cleanups under drivers/media
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/usbvideo/konicawc.c')
-rw-r--r-- | drivers/media/video/usbvideo/konicawc.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/media/video/usbvideo/konicawc.c b/drivers/media/video/usbvideo/konicawc.c index e2ede583518f..c11f5d46b114 100644 --- a/drivers/media/video/usbvideo/konicawc.c +++ b/drivers/media/video/usbvideo/konicawc.c | |||
@@ -36,7 +36,7 @@ | |||
36 | enum ctrl_req { | 36 | enum ctrl_req { |
37 | SetWhitebal = 0x01, | 37 | SetWhitebal = 0x01, |
38 | SetBrightness = 0x02, | 38 | SetBrightness = 0x02, |
39 | SetSharpness = 0x03, | 39 | SetSharpness = 0x03, |
40 | SetContrast = 0x04, | 40 | SetContrast = 0x04, |
41 | SetSaturation = 0x05, | 41 | SetSaturation = 0x05, |
42 | }; | 42 | }; |
@@ -47,7 +47,7 @@ enum frame_sizes { | |||
47 | SIZE_160X136 = 1, | 47 | SIZE_160X136 = 1, |
48 | SIZE_176X144 = 2, | 48 | SIZE_176X144 = 2, |
49 | SIZE_320X240 = 3, | 49 | SIZE_320X240 = 3, |
50 | 50 | ||
51 | }; | 51 | }; |
52 | 52 | ||
53 | #define MAX_FRAME_SIZE SIZE_320X240 | 53 | #define MAX_FRAME_SIZE SIZE_320X240 |
@@ -69,7 +69,7 @@ static const int debug = 0; | |||
69 | /* Some default values for initial camera settings, | 69 | /* Some default values for initial camera settings, |
70 | can be set by modprobe */ | 70 | can be set by modprobe */ |
71 | 71 | ||
72 | static int size; | 72 | static int size; |
73 | static int speed = 6; /* Speed (fps) 0 (slowest) to 6 (fastest) */ | 73 | static int speed = 6; /* Speed (fps) 0 (slowest) to 6 (fastest) */ |
74 | static int brightness = MAX_BRIGHTNESS/2; | 74 | static int brightness = MAX_BRIGHTNESS/2; |
75 | static int contrast = MAX_CONTRAST/2; | 75 | static int contrast = MAX_CONTRAST/2; |
@@ -132,24 +132,24 @@ struct konicawc { | |||
132 | 132 | ||
133 | static int konicawc_ctrl_msg(struct uvd *uvd, u8 dir, u8 request, u16 value, u16 index, void *buf, int len) | 133 | static int konicawc_ctrl_msg(struct uvd *uvd, u8 dir, u8 request, u16 value, u16 index, void *buf, int len) |
134 | { | 134 | { |
135 | int retval = usb_control_msg(uvd->dev, | 135 | int retval = usb_control_msg(uvd->dev, |
136 | dir ? usb_rcvctrlpipe(uvd->dev, 0) : usb_sndctrlpipe(uvd->dev, 0), | 136 | dir ? usb_rcvctrlpipe(uvd->dev, 0) : usb_sndctrlpipe(uvd->dev, 0), |
137 | request, 0x40 | dir, value, index, buf, len, 1000); | 137 | request, 0x40 | dir, value, index, buf, len, 1000); |
138 | return retval < 0 ? retval : 0; | 138 | return retval < 0 ? retval : 0; |
139 | } | 139 | } |
140 | 140 | ||
141 | 141 | ||
142 | static inline void konicawc_camera_on(struct uvd *uvd) | 142 | static inline void konicawc_camera_on(struct uvd *uvd) |
143 | { | 143 | { |
144 | DEBUG(0, "camera on"); | 144 | DEBUG(0, "camera on"); |
145 | konicawc_set_misc(uvd, 0x2, 1, 0x0b); | 145 | konicawc_set_misc(uvd, 0x2, 1, 0x0b); |
146 | } | 146 | } |
147 | 147 | ||
148 | 148 | ||
149 | static inline void konicawc_camera_off(struct uvd *uvd) | 149 | static inline void konicawc_camera_off(struct uvd *uvd) |
150 | { | 150 | { |
151 | DEBUG(0, "camera off"); | 151 | DEBUG(0, "camera off"); |
152 | konicawc_set_misc(uvd, 0x2, 0, 0x0b); | 152 | konicawc_set_misc(uvd, 0x2, 0, 0x0b); |
153 | } | 153 | } |
154 | 154 | ||
155 | 155 | ||
@@ -317,7 +317,7 @@ static int konicawc_compress_iso(struct uvd *uvd, struct urb *dataurb, struct ur | |||
317 | button = !!(sts & 0x40); | 317 | button = !!(sts & 0x40); |
318 | sts &= ~0x40; | 318 | sts &= ~0x40; |
319 | } | 319 | } |
320 | 320 | ||
321 | /* work out the button status, but don't do | 321 | /* work out the button status, but don't do |
322 | anything with it for now */ | 322 | anything with it for now */ |
323 | 323 | ||
@@ -331,7 +331,7 @@ static int konicawc_compress_iso(struct uvd *uvd, struct urb *dataurb, struct ur | |||
331 | discard++; | 331 | discard++; |
332 | continue; | 332 | continue; |
333 | } | 333 | } |
334 | 334 | ||
335 | if((sts > 0x01) && (sts < 0x80)) { | 335 | if((sts > 0x01) && (sts < 0x80)) { |
336 | info("unknown status %2.2x", sts); | 336 | info("unknown status %2.2x", sts); |
337 | bad++; | 337 | bad++; |
@@ -350,7 +350,7 @@ static int konicawc_compress_iso(struct uvd *uvd, struct urb *dataurb, struct ur | |||
350 | DEBUG(2, "found initial image"); | 350 | DEBUG(2, "found initial image"); |
351 | cam->lastframe = -1; | 351 | cam->lastframe = -1; |
352 | } | 352 | } |
353 | 353 | ||
354 | marker[3] = sts & 0x7F; | 354 | marker[3] = sts & 0x7F; |
355 | RingQueue_Enqueue(&uvd->dp, marker, 4); | 355 | RingQueue_Enqueue(&uvd->dp, marker, 4); |
356 | totlen += 4; | 356 | totlen += 4; |
@@ -367,16 +367,16 @@ static int konicawc_compress_iso(struct uvd *uvd, struct urb *dataurb, struct ur | |||
367 | 367 | ||
368 | static void resubmit_urb(struct uvd *uvd, struct urb *urb) | 368 | static void resubmit_urb(struct uvd *uvd, struct urb *urb) |
369 | { | 369 | { |
370 | int i, ret; | 370 | int i, ret; |
371 | for (i = 0; i < FRAMES_PER_DESC; i++) { | 371 | for (i = 0; i < FRAMES_PER_DESC; i++) { |
372 | urb->iso_frame_desc[i].status = 0; | 372 | urb->iso_frame_desc[i].status = 0; |
373 | } | 373 | } |
374 | urb->dev = uvd->dev; | 374 | urb->dev = uvd->dev; |
375 | urb->status = 0; | 375 | urb->status = 0; |
376 | ret = usb_submit_urb(urb, GFP_ATOMIC); | 376 | ret = usb_submit_urb(urb, GFP_ATOMIC); |
377 | DEBUG(3, "submitting urb of length %d", urb->transfer_buffer_length); | 377 | DEBUG(3, "submitting urb of length %d", urb->transfer_buffer_length); |
378 | if(ret) | 378 | if(ret) |
379 | err("usb_submit_urb error (%d)", ret); | 379 | err("usb_submit_urb error (%d)", ret); |
380 | 380 | ||
381 | } | 381 | } |
382 | 382 | ||
@@ -490,7 +490,7 @@ static int konicawc_start_data(struct uvd *uvd) | |||
490 | } | 490 | } |
491 | 491 | ||
492 | cam->last_data_urb = NULL; | 492 | cam->last_data_urb = NULL; |
493 | 493 | ||
494 | /* Submit all URBs */ | 494 | /* Submit all URBs */ |
495 | for (i=0; i < USBVIDEO_NUMSBUF; i++) { | 495 | for (i=0; i < USBVIDEO_NUMSBUF; i++) { |
496 | errFlag = usb_submit_urb(cam->sts_urb[i], GFP_KERNEL); | 496 | errFlag = usb_submit_urb(cam->sts_urb[i], GFP_KERNEL); |
@@ -539,7 +539,7 @@ static void konicawc_stop_data(struct uvd *uvd) | |||
539 | 539 | ||
540 | 540 | ||
541 | static void konicawc_process_isoc(struct uvd *uvd, struct usbvideo_frame *frame) | 541 | static void konicawc_process_isoc(struct uvd *uvd, struct usbvideo_frame *frame) |
542 | { | 542 | { |
543 | struct konicawc *cam = (struct konicawc *)uvd->user_data; | 543 | struct konicawc *cam = (struct konicawc *)uvd->user_data; |
544 | int maxline = cam->maxline; | 544 | int maxline = cam->maxline; |
545 | int yplanesz = cam->yplanesz; | 545 | int yplanesz = cam->yplanesz; |
@@ -583,13 +583,13 @@ static void konicawc_process_isoc(struct uvd *uvd, struct usbvideo_frame *frame) | |||
583 | 583 | ||
584 | if(frame->scanstate == ScanState_Scanning) | 584 | if(frame->scanstate == ScanState_Scanning) |
585 | return; | 585 | return; |
586 | 586 | ||
587 | /* Try to move data from queue into frame buffer | 587 | /* Try to move data from queue into frame buffer |
588 | * We get data in blocks of 384 bytes made up of: | 588 | * We get data in blocks of 384 bytes made up of: |
589 | * 256 Y, 64 U, 64 V. | 589 | * 256 Y, 64 U, 64 V. |
590 | * This needs to be written out as a Y plane, a U plane and a V plane. | 590 | * This needs to be written out as a Y plane, a U plane and a V plane. |
591 | */ | 591 | */ |
592 | 592 | ||
593 | while ( frame->curline < maxline && (RingQueue_GetLength(&uvd->dp) >= 384)) { | 593 | while ( frame->curline < maxline && (RingQueue_GetLength(&uvd->dp) >= 384)) { |
594 | /* Y */ | 594 | /* Y */ |
595 | RingQueue_Dequeue(&uvd->dp, frame->data + (frame->curline * 256), 256); | 595 | RingQueue_Dequeue(&uvd->dp, frame->data + (frame->curline * 256), 256); |