aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/usbvideo/usbvideo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/usbvideo/usbvideo.c')
-rw-r--r--drivers/media/video/usbvideo/usbvideo.c42
1 files changed, 21 insertions, 21 deletions
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;