diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-25 09:19:53 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-25 09:29:23 -0300 |
commit | d56410e0a594150c5ca06319da7bc8901c4d455e (patch) | |
tree | f1462651ac1bcc5cec48219dbb422ac615231423 /drivers/media/video/usbvideo | |
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')
-rw-r--r-- | drivers/media/video/usbvideo/ibmcam.c | 10 | ||||
-rw-r--r-- | drivers/media/video/usbvideo/konicawc.c | 48 | ||||
-rw-r--r-- | drivers/media/video/usbvideo/ultracam.c | 2 | ||||
-rw-r--r-- | drivers/media/video/usbvideo/usbvideo.c | 42 | ||||
-rw-r--r-- | drivers/media/video/usbvideo/usbvideo.h | 10 | ||||
-rw-r--r-- | drivers/media/video/usbvideo/vicam.c | 28 |
6 files changed, 70 insertions, 70 deletions
diff --git a/drivers/media/video/usbvideo/ibmcam.c b/drivers/media/video/usbvideo/ibmcam.c index a42c2229412..76f771b6a32 100644 --- a/drivers/media/video/usbvideo/ibmcam.c +++ b/drivers/media/video/usbvideo/ibmcam.c @@ -1300,11 +1300,11 @@ static void ibmcam_model2_Packet1(struct uvd *uvd, unsigned short v1, unsigned s /* * ibmcam_model3_Packet1() * - * 00_0078_012d + * 00_0078_012d * 00_0097_012f - * 00_d141_0124 + * 00_d141_0124 * 00_0096_0127 - * 00_fea8_0124 + * 00_fea8_0124 */ static void ibmcam_model3_Packet1(struct uvd *uvd, unsigned short v1, unsigned short v2) { @@ -2687,7 +2687,7 @@ static void ibmcam_model4_setup_after_video_if(struct uvd *uvd) ibmcam_veio(uvd, 0, 0x0004, 0x0127); ibmcam_veio(uvd, 0, 0xfea8, 0x0124); ibmcam_veio(uvd, 0, 0x00c0, 0x010c); - break; + break; } usb_clear_halt(uvd->dev, usb_rcvisocpipe(uvd->dev, uvd->video_endp)); } @@ -3238,7 +3238,7 @@ static void ibmcam_model3_setup_after_video_if(struct uvd *uvd) {0, 0x0062, 0x0107}, {0, 0x0003, 0x0111}, }; -#define NUM_INIT_DATA +#define NUM_INIT_DATA unsigned short compression = 0; /* 0=none, 7=best frame rate */ int f_rate; /* 0=Fastest 7=slowest */ diff --git a/drivers/media/video/usbvideo/konicawc.c b/drivers/media/video/usbvideo/konicawc.c index e2ede583518..c11f5d46b11 100644 --- a/drivers/media/video/usbvideo/konicawc.c +++ b/drivers/media/video/usbvideo/konicawc.c @@ -36,7 +36,7 @@ enum ctrl_req { SetWhitebal = 0x01, SetBrightness = 0x02, - SetSharpness = 0x03, + SetSharpness = 0x03, SetContrast = 0x04, SetSaturation = 0x05, }; @@ -47,7 +47,7 @@ enum frame_sizes { SIZE_160X136 = 1, SIZE_176X144 = 2, SIZE_320X240 = 3, - + }; #define MAX_FRAME_SIZE SIZE_320X240 @@ -69,7 +69,7 @@ static const int debug = 0; /* Some default values for initial camera settings, can be set by modprobe */ -static int size; +static int size; static int speed = 6; /* Speed (fps) 0 (slowest) to 6 (fastest) */ static int brightness = MAX_BRIGHTNESS/2; static int contrast = MAX_CONTRAST/2; @@ -132,24 +132,24 @@ struct konicawc { static int konicawc_ctrl_msg(struct uvd *uvd, u8 dir, u8 request, u16 value, u16 index, void *buf, int len) { - int retval = usb_control_msg(uvd->dev, + int retval = usb_control_msg(uvd->dev, dir ? usb_rcvctrlpipe(uvd->dev, 0) : usb_sndctrlpipe(uvd->dev, 0), request, 0x40 | dir, value, index, buf, len, 1000); - return retval < 0 ? retval : 0; + return retval < 0 ? retval : 0; } static inline void konicawc_camera_on(struct uvd *uvd) { - DEBUG(0, "camera on"); - konicawc_set_misc(uvd, 0x2, 1, 0x0b); + DEBUG(0, "camera on"); + konicawc_set_misc(uvd, 0x2, 1, 0x0b); } static inline void konicawc_camera_off(struct uvd *uvd) { - DEBUG(0, "camera off"); - konicawc_set_misc(uvd, 0x2, 0, 0x0b); + DEBUG(0, "camera off"); + konicawc_set_misc(uvd, 0x2, 0, 0x0b); } @@ -317,7 +317,7 @@ static int konicawc_compress_iso(struct uvd *uvd, struct urb *dataurb, struct ur button = !!(sts & 0x40); sts &= ~0x40; } - + /* work out the button status, but don't do anything with it for now */ @@ -331,7 +331,7 @@ static int konicawc_compress_iso(struct uvd *uvd, struct urb *dataurb, struct ur discard++; continue; } - + if((sts > 0x01) && (sts < 0x80)) { info("unknown status %2.2x", sts); bad++; @@ -350,7 +350,7 @@ static int konicawc_compress_iso(struct uvd *uvd, struct urb *dataurb, struct ur DEBUG(2, "found initial image"); cam->lastframe = -1; } - + marker[3] = sts & 0x7F; RingQueue_Enqueue(&uvd->dp, marker, 4); totlen += 4; @@ -367,16 +367,16 @@ static int konicawc_compress_iso(struct uvd *uvd, struct urb *dataurb, struct ur static void resubmit_urb(struct uvd *uvd, struct urb *urb) { - int i, ret; - for (i = 0; i < FRAMES_PER_DESC; i++) { - urb->iso_frame_desc[i].status = 0; - } - urb->dev = uvd->dev; - urb->status = 0; + int i, ret; + for (i = 0; i < FRAMES_PER_DESC; i++) { + urb->iso_frame_desc[i].status = 0; + } + urb->dev = uvd->dev; + urb->status = 0; ret = usb_submit_urb(urb, GFP_ATOMIC); DEBUG(3, "submitting urb of length %d", urb->transfer_buffer_length); - if(ret) - err("usb_submit_urb error (%d)", ret); + if(ret) + err("usb_submit_urb error (%d)", ret); } @@ -490,7 +490,7 @@ static int konicawc_start_data(struct uvd *uvd) } cam->last_data_urb = NULL; - + /* Submit all URBs */ for (i=0; i < USBVIDEO_NUMSBUF; i++) { errFlag = usb_submit_urb(cam->sts_urb[i], GFP_KERNEL); @@ -539,7 +539,7 @@ static void konicawc_stop_data(struct uvd *uvd) static void konicawc_process_isoc(struct uvd *uvd, struct usbvideo_frame *frame) -{ +{ struct konicawc *cam = (struct konicawc *)uvd->user_data; int maxline = cam->maxline; int yplanesz = cam->yplanesz; @@ -583,13 +583,13 @@ static void konicawc_process_isoc(struct uvd *uvd, struct usbvideo_frame *frame) if(frame->scanstate == ScanState_Scanning) return; - + /* Try to move data from queue into frame buffer * We get data in blocks of 384 bytes made up of: * 256 Y, 64 U, 64 V. * This needs to be written out as a Y plane, a U plane and a V plane. */ - + while ( frame->curline < maxline && (RingQueue_GetLength(&uvd->dp) >= 384)) { /* Y */ RingQueue_Dequeue(&uvd->dp, frame->data + (frame->curline * 256), 256); diff --git a/drivers/media/video/usbvideo/ultracam.c b/drivers/media/video/usbvideo/ultracam.c index 75ff755224d..10c58b4a2e5 100644 --- a/drivers/media/video/usbvideo/ultracam.c +++ b/drivers/media/video/usbvideo/ultracam.c @@ -23,7 +23,7 @@ typedef struct { int initialized; /* Had we already sent init sequence? */ int camera_model; /* What type of IBM camera we got? */ - int has_hdr; + int has_hdr; } ultracam_t; #define ULTRACAM_T(uvd) ((ultracam_t *)((uvd)->user_data)) diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c index 0b51fae720a..13b37c8c0d5 100644 --- a/drivers/media/video/usbvideo/usbvideo.c +++ b/drivers/media/video/usbvideo/usbvideo.c @@ -574,7 +574,7 @@ void usbvideo_TestPattern(struct uvd *uvd, int fullframe, int pmode) } else { /* Just the blue screen */ } - + *f++ = cb; *f++ = cg; *f++ = cr; @@ -1243,7 +1243,7 @@ static int usbvideo_v4l_close(struct inode *inode, struct file *file) #if USBVIDEO_REPORT_STATS usbvideo_ReportStatistics(uvd); -#endif +#endif uvd->user--; if (uvd->remove_pending) { @@ -1290,7 +1290,7 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file, return 0; } case VIDIOCSCHAN: - { + { struct video_channel *v = arg; if (v->channel != 0) return -EINVAL; @@ -1347,7 +1347,7 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file, vw->chromakey = 0; if (VALID_CALLBACK(uvd, getFPS)) vw->flags = GET_CALLBACK(uvd, getFPS)(uvd); - else + else vw->flags = 10; /* FIXME: do better! */ return 0; } @@ -1359,7 +1359,7 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file, memset(vm, 0, sizeof(*vm)); vm->size = uvd->max_frame_size * USBVIDEO_NUMFRAMES; vm->frames = USBVIDEO_NUMFRAMES; - for(i = 0; i < USBVIDEO_NUMFRAMES; i++) + for(i = 0; i < USBVIDEO_NUMFRAMES; i++) vm->offsets[i] = i * uvd->max_frame_size; return 0; @@ -1425,7 +1425,7 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file, if (*frameNum < 0 || *frameNum >= USBVIDEO_NUMFRAMES) return -EINVAL; - + if (uvd->debug >= 1) info("VIDIOCSYNC: syncing to frame %d.", *frameNum); if (uvd->flags & FLAGS_NO_DECODING) @@ -1454,8 +1454,8 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file, struct video_buffer *vb = arg; memset(vb, 0, sizeof(*vb)); - return 0; - } + return 0; + } case VIDIOCKEY: return 0; @@ -1704,7 +1704,7 @@ static void usbvideo_IsocIrq(struct urb *urb, struct pt_regs *regs) info("Not streaming, but interrupt!"); return; } - + uvd->stats.urb_count++; if (urb->actual_length <= 0) goto urb_done_with; @@ -1763,7 +1763,7 @@ static int usbvideo_StartDataPump(struct uvd *uvd) } if (VALID_CALLBACK(uvd, videoStart)) GET_CALLBACK(uvd, videoStart)(uvd); - else + else err("%s: videoStart not set", __FUNCTION__); /* We double buffer the Iso lists */ @@ -1830,7 +1830,7 @@ static void usbvideo_StopDataPump(struct uvd *uvd) /* Invoke minidriver's magic to stop the camera */ if (VALID_CALLBACK(uvd, videoStop)) GET_CALLBACK(uvd, videoStop)(uvd); - else + else err("%s: videoStop not set", __FUNCTION__); /* Set packet size to 0 */ @@ -1963,14 +1963,14 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum) info("%s($%p,%d.)", __FUNCTION__, uvd, frameNum); switch (frame->frameState) { - case FrameState_Unused: + case FrameState_Unused: if (uvd->debug >= 2) info("%s: FrameState_Unused", __FUNCTION__); return -EINVAL; - case FrameState_Ready: - case FrameState_Grabbing: - case FrameState_Error: - { + case FrameState_Ready: + case FrameState_Grabbing: + case FrameState_Error: + { int ntries, signalPending; redo: if (!CAMERA_IS_OPERATIONAL(uvd)) { @@ -1978,7 +1978,7 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum) info("%s: Camera is not operational (1)", __FUNCTION__); return -EIO; } - ntries = 0; + ntries = 0; do { RingQueue_InterruptibleSleepOn(&uvd->dp); signalPending = signal_pending(current); @@ -2010,7 +2010,7 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum) usbvideo_CollectRawData(uvd, frame); else if (VALID_CALLBACK(uvd, processData)) GET_CALLBACK(uvd, processData)(uvd, frame); - else + else err("%s: processData not set", __FUNCTION__); } } while (frame->frameState == FrameState_Grabbing); @@ -2027,8 +2027,8 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum) goto redo; } /* Note that we fall through to meet our destiny below */ - } - case FrameState_Done: + } + case FrameState_Done: /* * Do all necessary postprocessing of data prepared in * "interrupt" code and the collecting code above. The @@ -2157,7 +2157,7 @@ EXPORT_SYMBOL(usbvideo_DeinterlaceFrame); * History: * 09-Feb-2001 Created. */ -static void usbvideo_SoftwareContrastAdjustment(struct uvd *uvd, +static void usbvideo_SoftwareContrastAdjustment(struct uvd *uvd, struct usbvideo_frame *frame) { int i, j, v4l_linesize; diff --git a/drivers/media/video/usbvideo/usbvideo.h b/drivers/media/video/usbvideo/usbvideo.h index 135433c2680..3cbf4fc499a 100644 --- a/drivers/media/video/usbvideo/usbvideo.h +++ b/drivers/media/video/usbvideo/usbvideo.h @@ -189,11 +189,11 @@ struct usbvideo_frame { /* Statistics that can be overlaid on screen */ struct usbvideo_statistics { - unsigned long frame_num; /* Sequential number of the frame */ - unsigned long urb_count; /* How many URBs we received so far */ - unsigned long urb_length; /* Length of last URB */ - unsigned long data_count; /* How many bytes we received */ - unsigned long header_count; /* How many frame headers we found */ + unsigned long frame_num; /* Sequential number of the frame */ + unsigned long urb_count; /* How many URBs we received so far */ + unsigned long urb_length; /* Length of last URB */ + unsigned long data_count; /* How many bytes we received */ + unsigned long header_count; /* How many frame headers we found */ unsigned long iso_skip_count; /* How many empty ISO packets received */ unsigned long iso_err_count; /* How many bad ISO packets received */ }; diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c index 1d06e53ec7c..90d48e8510b 100644 --- a/drivers/media/video/usbvideo/vicam.c +++ b/drivers/media/video/usbvideo/vicam.c @@ -69,10 +69,10 @@ #define VICAM_HEADER_SIZE 64 #define clamp( x, l, h ) max_t( __typeof__( x ), \ - ( l ), \ - min_t( __typeof__( x ), \ - ( h ), \ - ( x ) ) ) + ( l ), \ + min_t( __typeof__( x ), \ + ( h ), \ + ( x ) ) ) /* Not sure what all the bytes in these char * arrays do, but they're necessary to make @@ -357,7 +357,7 @@ static unsigned char setup5[] = { * Not sure why these are not yet non-statics which I can reference through * usbvideo.h the same as it is in 2.4.20. I bet this will get fixed sometime * in the future. - * + * */ static void *rvmalloc(unsigned long size) { @@ -603,12 +603,12 @@ vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsign case VIDIOCSPICT: { struct video_picture vp; - + if (copy_from_user(&vp, user_arg, sizeof(vp))) { retval = -EFAULT; break; } - + DBG("VIDIOCSPICT depth = %d, pal = %d\n", vp.depth, vp.palette); @@ -655,7 +655,7 @@ vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsign } DBG("VIDIOCSWIN %d x %d\n", vw.width, vw.height); - + if ( vw.width != 320 || vw.height != 240 ) retval = -EFAULT; @@ -809,12 +809,12 @@ vicam_open(struct inode *inode, struct file *file) cam->needsDummyRead = 1; cam->open_count++; - file->private_data = cam; - + file->private_data = cam; + return 0; } -static int +static int vicam_close(struct inode *inode, struct file *file) { struct vicam_camera *cam = file->private_data; @@ -1187,7 +1187,7 @@ vicam_create_proc_entry(struct vicam_camera *cam) if ( !cam->proc_dir ) return; // FIXME: We should probably return an error here - + ent = create_proc_entry("shutter", S_IFREG | S_IRUGO | S_IWUSR, cam->proc_dir); if (ent) { @@ -1282,7 +1282,7 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id) const struct usb_host_interface *interface; const struct usb_endpoint_descriptor *endpoint; struct vicam_camera *cam; - + printk(KERN_INFO "ViCam based webcam connected\n"); interface = intf->cur_altsetting; @@ -1331,7 +1331,7 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id) printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n",cam->vdev.minor); usb_set_intfdata (intf, cam); - + return 0; } |