aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/usbvideo
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/usbvideo')
-rw-r--r--drivers/media/video/usbvideo/ibmcam.c10
-rw-r--r--drivers/media/video/usbvideo/konicawc.c48
-rw-r--r--drivers/media/video/usbvideo/ultracam.c2
-rw-r--r--drivers/media/video/usbvideo/usbvideo.c42
-rw-r--r--drivers/media/video/usbvideo/usbvideo.h10
-rw-r--r--drivers/media/video/usbvideo/vicam.c28
6 files changed, 70 insertions, 70 deletions
diff --git a/drivers/media/video/usbvideo/ibmcam.c b/drivers/media/video/usbvideo/ibmcam.c
index a42c22294124..76f771b6a32f 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
1300/* 1300/*
1301 * ibmcam_model3_Packet1() 1301 * ibmcam_model3_Packet1()
1302 * 1302 *
1303 * 00_0078_012d 1303 * 00_0078_012d
1304 * 00_0097_012f 1304 * 00_0097_012f
1305 * 00_d141_0124 1305 * 00_d141_0124
1306 * 00_0096_0127 1306 * 00_0096_0127
1307 * 00_fea8_0124 1307 * 00_fea8_0124
1308*/ 1308*/
1309static void ibmcam_model3_Packet1(struct uvd *uvd, unsigned short v1, unsigned short v2) 1309static void ibmcam_model3_Packet1(struct uvd *uvd, unsigned short v1, unsigned short v2)
1310{ 1310{
@@ -2687,7 +2687,7 @@ static void ibmcam_model4_setup_after_video_if(struct uvd *uvd)
2687 ibmcam_veio(uvd, 0, 0x0004, 0x0127); 2687 ibmcam_veio(uvd, 0, 0x0004, 0x0127);
2688 ibmcam_veio(uvd, 0, 0xfea8, 0x0124); 2688 ibmcam_veio(uvd, 0, 0xfea8, 0x0124);
2689 ibmcam_veio(uvd, 0, 0x00c0, 0x010c); 2689 ibmcam_veio(uvd, 0, 0x00c0, 0x010c);
2690 break; 2690 break;
2691 } 2691 }
2692 usb_clear_halt(uvd->dev, usb_rcvisocpipe(uvd->dev, uvd->video_endp)); 2692 usb_clear_halt(uvd->dev, usb_rcvisocpipe(uvd->dev, uvd->video_endp));
2693} 2693}
@@ -3238,7 +3238,7 @@ static void ibmcam_model3_setup_after_video_if(struct uvd *uvd)
3238 {0, 0x0062, 0x0107}, 3238 {0, 0x0062, 0x0107},
3239 {0, 0x0003, 0x0111}, 3239 {0, 0x0003, 0x0111},
3240 }; 3240 };
3241#define NUM_INIT_DATA 3241#define NUM_INIT_DATA
3242 3242
3243 unsigned short compression = 0; /* 0=none, 7=best frame rate */ 3243 unsigned short compression = 0; /* 0=none, 7=best frame rate */
3244 int f_rate; /* 0=Fastest 7=slowest */ 3244 int f_rate; /* 0=Fastest 7=slowest */
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 @@
36enum ctrl_req { 36enum 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
72static int size; 72static int size;
73static int speed = 6; /* Speed (fps) 0 (slowest) to 6 (fastest) */ 73static int speed = 6; /* Speed (fps) 0 (slowest) to 6 (fastest) */
74static int brightness = MAX_BRIGHTNESS/2; 74static int brightness = MAX_BRIGHTNESS/2;
75static int contrast = MAX_CONTRAST/2; 75static int contrast = MAX_CONTRAST/2;
@@ -132,24 +132,24 @@ struct konicawc {
132 132
133static int konicawc_ctrl_msg(struct uvd *uvd, u8 dir, u8 request, u16 value, u16 index, void *buf, int len) 133static 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
142static inline void konicawc_camera_on(struct uvd *uvd) 142static 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
149static inline void konicawc_camera_off(struct uvd *uvd) 149static 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
368static void resubmit_urb(struct uvd *uvd, struct urb *urb) 368static 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
541static void konicawc_process_isoc(struct uvd *uvd, struct usbvideo_frame *frame) 541static 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);
diff --git a/drivers/media/video/usbvideo/ultracam.c b/drivers/media/video/usbvideo/ultracam.c
index 75ff755224df..10c58b4a2e5b 100644
--- a/drivers/media/video/usbvideo/ultracam.c
+++ b/drivers/media/video/usbvideo/ultracam.c
@@ -23,7 +23,7 @@
23typedef struct { 23typedef struct {
24 int initialized; /* Had we already sent init sequence? */ 24 int initialized; /* Had we already sent init sequence? */
25 int camera_model; /* What type of IBM camera we got? */ 25 int camera_model; /* What type of IBM camera we got? */
26 int has_hdr; 26 int has_hdr;
27} ultracam_t; 27} ultracam_t;
28#define ULTRACAM_T(uvd) ((ultracam_t *)((uvd)->user_data)) 28#define ULTRACAM_T(uvd) ((ultracam_t *)((uvd)->user_data))
29 29
diff --git a/drivers/media/video/usbvideo/usbvideo.c b/drivers/media/video/usbvideo/usbvideo.c
index 0b51fae720a9..13b37c8c0d56 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)
574 } else { 574 } else {
575 /* Just the blue screen */ 575 /* Just the blue screen */
576 } 576 }
577 577
578 *f++ = cb; 578 *f++ = cb;
579 *f++ = cg; 579 *f++ = cg;
580 *f++ = cr; 580 *f++ = cr;
@@ -1243,7 +1243,7 @@ static int usbvideo_v4l_close(struct inode *inode, struct file *file)
1243 1243
1244#if USBVIDEO_REPORT_STATS 1244#if USBVIDEO_REPORT_STATS
1245 usbvideo_ReportStatistics(uvd); 1245 usbvideo_ReportStatistics(uvd);
1246#endif 1246#endif
1247 1247
1248 uvd->user--; 1248 uvd->user--;
1249 if (uvd->remove_pending) { 1249 if (uvd->remove_pending) {
@@ -1290,7 +1290,7 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file,
1290 return 0; 1290 return 0;
1291 } 1291 }
1292 case VIDIOCSCHAN: 1292 case VIDIOCSCHAN:
1293 { 1293 {
1294 struct video_channel *v = arg; 1294 struct video_channel *v = arg;
1295 if (v->channel != 0) 1295 if (v->channel != 0)
1296 return -EINVAL; 1296 return -EINVAL;
@@ -1347,7 +1347,7 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file,
1347 vw->chromakey = 0; 1347 vw->chromakey = 0;
1348 if (VALID_CALLBACK(uvd, getFPS)) 1348 if (VALID_CALLBACK(uvd, getFPS))
1349 vw->flags = GET_CALLBACK(uvd, getFPS)(uvd); 1349 vw->flags = GET_CALLBACK(uvd, getFPS)(uvd);
1350 else 1350 else
1351 vw->flags = 10; /* FIXME: do better! */ 1351 vw->flags = 10; /* FIXME: do better! */
1352 return 0; 1352 return 0;
1353 } 1353 }
@@ -1359,7 +1359,7 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file,
1359 memset(vm, 0, sizeof(*vm)); 1359 memset(vm, 0, sizeof(*vm));
1360 vm->size = uvd->max_frame_size * USBVIDEO_NUMFRAMES; 1360 vm->size = uvd->max_frame_size * USBVIDEO_NUMFRAMES;
1361 vm->frames = USBVIDEO_NUMFRAMES; 1361 vm->frames = USBVIDEO_NUMFRAMES;
1362 for(i = 0; i < USBVIDEO_NUMFRAMES; i++) 1362 for(i = 0; i < USBVIDEO_NUMFRAMES; i++)
1363 vm->offsets[i] = i * uvd->max_frame_size; 1363 vm->offsets[i] = i * uvd->max_frame_size;
1364 1364
1365 return 0; 1365 return 0;
@@ -1425,7 +1425,7 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file,
1425 1425
1426 if (*frameNum < 0 || *frameNum >= USBVIDEO_NUMFRAMES) 1426 if (*frameNum < 0 || *frameNum >= USBVIDEO_NUMFRAMES)
1427 return -EINVAL; 1427 return -EINVAL;
1428 1428
1429 if (uvd->debug >= 1) 1429 if (uvd->debug >= 1)
1430 info("VIDIOCSYNC: syncing to frame %d.", *frameNum); 1430 info("VIDIOCSYNC: syncing to frame %d.", *frameNum);
1431 if (uvd->flags & FLAGS_NO_DECODING) 1431 if (uvd->flags & FLAGS_NO_DECODING)
@@ -1454,8 +1454,8 @@ static int usbvideo_v4l_do_ioctl(struct inode *inode, struct file *file,
1454 struct video_buffer *vb = arg; 1454 struct video_buffer *vb = arg;
1455 1455
1456 memset(vb, 0, sizeof(*vb)); 1456 memset(vb, 0, sizeof(*vb));
1457 return 0; 1457 return 0;
1458 } 1458 }
1459 case VIDIOCKEY: 1459 case VIDIOCKEY:
1460 return 0; 1460 return 0;
1461 1461
@@ -1704,7 +1704,7 @@ static void usbvideo_IsocIrq(struct urb *urb, struct pt_regs *regs)
1704 info("Not streaming, but interrupt!"); 1704 info("Not streaming, but interrupt!");
1705 return; 1705 return;
1706 } 1706 }
1707 1707
1708 uvd->stats.urb_count++; 1708 uvd->stats.urb_count++;
1709 if (urb->actual_length <= 0) 1709 if (urb->actual_length <= 0)
1710 goto urb_done_with; 1710 goto urb_done_with;
@@ -1763,7 +1763,7 @@ static int usbvideo_StartDataPump(struct uvd *uvd)
1763 } 1763 }
1764 if (VALID_CALLBACK(uvd, videoStart)) 1764 if (VALID_CALLBACK(uvd, videoStart))
1765 GET_CALLBACK(uvd, videoStart)(uvd); 1765 GET_CALLBACK(uvd, videoStart)(uvd);
1766 else 1766 else
1767 err("%s: videoStart not set", __FUNCTION__); 1767 err("%s: videoStart not set", __FUNCTION__);
1768 1768
1769 /* We double buffer the Iso lists */ 1769 /* We double buffer the Iso lists */
@@ -1830,7 +1830,7 @@ static void usbvideo_StopDataPump(struct uvd *uvd)
1830 /* Invoke minidriver's magic to stop the camera */ 1830 /* Invoke minidriver's magic to stop the camera */
1831 if (VALID_CALLBACK(uvd, videoStop)) 1831 if (VALID_CALLBACK(uvd, videoStop))
1832 GET_CALLBACK(uvd, videoStop)(uvd); 1832 GET_CALLBACK(uvd, videoStop)(uvd);
1833 else 1833 else
1834 err("%s: videoStop not set", __FUNCTION__); 1834 err("%s: videoStop not set", __FUNCTION__);
1835 1835
1836 /* Set packet size to 0 */ 1836 /* Set packet size to 0 */
@@ -1963,14 +1963,14 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum)
1963 info("%s($%p,%d.)", __FUNCTION__, uvd, frameNum); 1963 info("%s($%p,%d.)", __FUNCTION__, uvd, frameNum);
1964 1964
1965 switch (frame->frameState) { 1965 switch (frame->frameState) {
1966 case FrameState_Unused: 1966 case FrameState_Unused:
1967 if (uvd->debug >= 2) 1967 if (uvd->debug >= 2)
1968 info("%s: FrameState_Unused", __FUNCTION__); 1968 info("%s: FrameState_Unused", __FUNCTION__);
1969 return -EINVAL; 1969 return -EINVAL;
1970 case FrameState_Ready: 1970 case FrameState_Ready:
1971 case FrameState_Grabbing: 1971 case FrameState_Grabbing:
1972 case FrameState_Error: 1972 case FrameState_Error:
1973 { 1973 {
1974 int ntries, signalPending; 1974 int ntries, signalPending;
1975 redo: 1975 redo:
1976 if (!CAMERA_IS_OPERATIONAL(uvd)) { 1976 if (!CAMERA_IS_OPERATIONAL(uvd)) {
@@ -1978,7 +1978,7 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum)
1978 info("%s: Camera is not operational (1)", __FUNCTION__); 1978 info("%s: Camera is not operational (1)", __FUNCTION__);
1979 return -EIO; 1979 return -EIO;
1980 } 1980 }
1981 ntries = 0; 1981 ntries = 0;
1982 do { 1982 do {
1983 RingQueue_InterruptibleSleepOn(&uvd->dp); 1983 RingQueue_InterruptibleSleepOn(&uvd->dp);
1984 signalPending = signal_pending(current); 1984 signalPending = signal_pending(current);
@@ -2010,7 +2010,7 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum)
2010 usbvideo_CollectRawData(uvd, frame); 2010 usbvideo_CollectRawData(uvd, frame);
2011 else if (VALID_CALLBACK(uvd, processData)) 2011 else if (VALID_CALLBACK(uvd, processData))
2012 GET_CALLBACK(uvd, processData)(uvd, frame); 2012 GET_CALLBACK(uvd, processData)(uvd, frame);
2013 else 2013 else
2014 err("%s: processData not set", __FUNCTION__); 2014 err("%s: processData not set", __FUNCTION__);
2015 } 2015 }
2016 } while (frame->frameState == FrameState_Grabbing); 2016 } while (frame->frameState == FrameState_Grabbing);
@@ -2027,8 +2027,8 @@ static int usbvideo_GetFrame(struct uvd *uvd, int frameNum)
2027 goto redo; 2027 goto redo;
2028 } 2028 }
2029 /* Note that we fall through to meet our destiny below */ 2029 /* Note that we fall through to meet our destiny below */
2030 } 2030 }
2031 case FrameState_Done: 2031 case FrameState_Done:
2032 /* 2032 /*
2033 * Do all necessary postprocessing of data prepared in 2033 * Do all necessary postprocessing of data prepared in
2034 * "interrupt" code and the collecting code above. The 2034 * "interrupt" code and the collecting code above. The
@@ -2157,7 +2157,7 @@ EXPORT_SYMBOL(usbvideo_DeinterlaceFrame);
2157 * History: 2157 * History:
2158 * 09-Feb-2001 Created. 2158 * 09-Feb-2001 Created.
2159 */ 2159 */
2160static void usbvideo_SoftwareContrastAdjustment(struct uvd *uvd, 2160static void usbvideo_SoftwareContrastAdjustment(struct uvd *uvd,
2161 struct usbvideo_frame *frame) 2161 struct usbvideo_frame *frame)
2162{ 2162{
2163 int i, j, v4l_linesize; 2163 int i, j, v4l_linesize;
diff --git a/drivers/media/video/usbvideo/usbvideo.h b/drivers/media/video/usbvideo/usbvideo.h
index 135433c2680a..3cbf4fc499a3 100644
--- a/drivers/media/video/usbvideo/usbvideo.h
+++ b/drivers/media/video/usbvideo/usbvideo.h
@@ -189,11 +189,11 @@ struct usbvideo_frame {
189 189
190/* Statistics that can be overlaid on screen */ 190/* Statistics that can be overlaid on screen */
191struct usbvideo_statistics { 191struct usbvideo_statistics {
192 unsigned long frame_num; /* Sequential number of the frame */ 192 unsigned long frame_num; /* Sequential number of the frame */
193 unsigned long urb_count; /* How many URBs we received so far */ 193 unsigned long urb_count; /* How many URBs we received so far */
194 unsigned long urb_length; /* Length of last URB */ 194 unsigned long urb_length; /* Length of last URB */
195 unsigned long data_count; /* How many bytes we received */ 195 unsigned long data_count; /* How many bytes we received */
196 unsigned long header_count; /* How many frame headers we found */ 196 unsigned long header_count; /* How many frame headers we found */
197 unsigned long iso_skip_count; /* How many empty ISO packets received */ 197 unsigned long iso_skip_count; /* How many empty ISO packets received */
198 unsigned long iso_err_count; /* How many bad ISO packets received */ 198 unsigned long iso_err_count; /* How many bad ISO packets received */
199}; 199};
diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c
index 1d06e53ec7c5..90d48e8510ba 100644
--- a/drivers/media/video/usbvideo/vicam.c
+++ b/drivers/media/video/usbvideo/vicam.c
@@ -69,10 +69,10 @@
69#define VICAM_HEADER_SIZE 64 69#define VICAM_HEADER_SIZE 64
70 70
71#define clamp( x, l, h ) max_t( __typeof__( x ), \ 71#define clamp( x, l, h ) max_t( __typeof__( x ), \
72 ( l ), \ 72 ( l ), \
73 min_t( __typeof__( x ), \ 73 min_t( __typeof__( x ), \
74 ( h ), \ 74 ( h ), \
75 ( x ) ) ) 75 ( x ) ) )
76 76
77/* Not sure what all the bytes in these char 77/* Not sure what all the bytes in these char
78 * arrays do, but they're necessary to make 78 * arrays do, but they're necessary to make
@@ -357,7 +357,7 @@ static unsigned char setup5[] = {
357 * Not sure why these are not yet non-statics which I can reference through 357 * Not sure why these are not yet non-statics which I can reference through
358 * usbvideo.h the same as it is in 2.4.20. I bet this will get fixed sometime 358 * usbvideo.h the same as it is in 2.4.20. I bet this will get fixed sometime
359 * in the future. 359 * in the future.
360 * 360 *
361*/ 361*/
362static void *rvmalloc(unsigned long size) 362static void *rvmalloc(unsigned long size)
363{ 363{
@@ -603,12 +603,12 @@ vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsign
603 case VIDIOCSPICT: 603 case VIDIOCSPICT:
604 { 604 {
605 struct video_picture vp; 605 struct video_picture vp;
606 606
607 if (copy_from_user(&vp, user_arg, sizeof(vp))) { 607 if (copy_from_user(&vp, user_arg, sizeof(vp))) {
608 retval = -EFAULT; 608 retval = -EFAULT;
609 break; 609 break;
610 } 610 }
611 611
612 DBG("VIDIOCSPICT depth = %d, pal = %d\n", vp.depth, 612 DBG("VIDIOCSPICT depth = %d, pal = %d\n", vp.depth,
613 vp.palette); 613 vp.palette);
614 614
@@ -655,7 +655,7 @@ vicam_ioctl(struct inode *inode, struct file *file, unsigned int ioctlnr, unsign
655 } 655 }
656 656
657 DBG("VIDIOCSWIN %d x %d\n", vw.width, vw.height); 657 DBG("VIDIOCSWIN %d x %d\n", vw.width, vw.height);
658 658
659 if ( vw.width != 320 || vw.height != 240 ) 659 if ( vw.width != 320 || vw.height != 240 )
660 retval = -EFAULT; 660 retval = -EFAULT;
661 661
@@ -809,12 +809,12 @@ vicam_open(struct inode *inode, struct file *file)
809 cam->needsDummyRead = 1; 809 cam->needsDummyRead = 1;
810 cam->open_count++; 810 cam->open_count++;
811 811
812 file->private_data = cam; 812 file->private_data = cam;
813 813
814 return 0; 814 return 0;
815} 815}
816 816
817static int 817static int
818vicam_close(struct inode *inode, struct file *file) 818vicam_close(struct inode *inode, struct file *file)
819{ 819{
820 struct vicam_camera *cam = file->private_data; 820 struct vicam_camera *cam = file->private_data;
@@ -1187,7 +1187,7 @@ vicam_create_proc_entry(struct vicam_camera *cam)
1187 1187
1188 if ( !cam->proc_dir ) 1188 if ( !cam->proc_dir )
1189 return; // FIXME: We should probably return an error here 1189 return; // FIXME: We should probably return an error here
1190 1190
1191 ent = create_proc_entry("shutter", S_IFREG | S_IRUGO | S_IWUSR, 1191 ent = create_proc_entry("shutter", S_IFREG | S_IRUGO | S_IWUSR,
1192 cam->proc_dir); 1192 cam->proc_dir);
1193 if (ent) { 1193 if (ent) {
@@ -1282,7 +1282,7 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id)
1282 const struct usb_host_interface *interface; 1282 const struct usb_host_interface *interface;
1283 const struct usb_endpoint_descriptor *endpoint; 1283 const struct usb_endpoint_descriptor *endpoint;
1284 struct vicam_camera *cam; 1284 struct vicam_camera *cam;
1285 1285
1286 printk(KERN_INFO "ViCam based webcam connected\n"); 1286 printk(KERN_INFO "ViCam based webcam connected\n");
1287 1287
1288 interface = intf->cur_altsetting; 1288 interface = intf->cur_altsetting;
@@ -1331,7 +1331,7 @@ vicam_probe( struct usb_interface *intf, const struct usb_device_id *id)
1331 printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n",cam->vdev.minor); 1331 printk(KERN_INFO "ViCam webcam driver now controlling video device %d\n",cam->vdev.minor);
1332 1332
1333 usb_set_intfdata (intf, cam); 1333 usb_set_intfdata (intf, cam);
1334 1334
1335 return 0; 1335 return 0;
1336} 1336}
1337 1337