aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/usbvision/usbvision-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/usbvision/usbvision-core.c')
-rw-r--r--drivers/media/video/usbvision/usbvision-core.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c
index cf5d4771312d..e660a91d8251 100644
--- a/drivers/media/video/usbvision/usbvision-core.c
+++ b/drivers/media/video/usbvision/usbvision-core.c
@@ -47,8 +47,8 @@
47#include <media/tuner.h> 47#include <media/tuner.h>
48#include <media/audiochip.h> 48#include <media/audiochip.h>
49 49
50 #include <linux/moduleparam.h> 50#include <linux/moduleparam.h>
51 #include <linux/workqueue.h> 51#include <linux/workqueue.h>
52 52
53#ifdef CONFIG_KMOD 53#ifdef CONFIG_KMOD
54#include <linux/kmod.h> 54#include <linux/kmod.h>
@@ -1397,7 +1397,7 @@ static int usbvision_compress_isochronous(struct usb_usbvision *usbvision,
1397 return totlen; 1397 return totlen;
1398} 1398}
1399 1399
1400static void usbvision_isocIrq(struct urb *urb, struct pt_regs *regs) 1400static void usbvision_isocIrq(struct urb *urb)
1401{ 1401{
1402 int errCode = 0; 1402 int errCode = 0;
1403 int len; 1403 int len;
@@ -1529,7 +1529,7 @@ int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg,
1529} 1529}
1530 1530
1531 1531
1532static void usbvision_ctrlUrb_complete(struct urb *urb, struct pt_regs *regs) 1532static void usbvision_ctrlUrb_complete(struct urb *urb)
1533{ 1533{
1534 struct usb_usbvision *usbvision = (struct usb_usbvision *)urb->context; 1534 struct usb_usbvision *usbvision = (struct usb_usbvision *)urb->context;
1535 1535
@@ -2416,11 +2416,7 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
2416 int j, k; 2416 int j, k;
2417 struct urb *urb; 2417 struct urb *urb;
2418 2418
2419 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) 2419 urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL);
2420 urb = usb_alloc_urb(USBVISION_URB_FRAMES);
2421 #else
2422 urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL);
2423 #endif
2424 if (urb == NULL) { 2420 if (urb == NULL) {
2425 err("%s: usb_alloc_urb() failed", __FUNCTION__); 2421 err("%s: usb_alloc_urb() failed", __FUNCTION__);
2426 return -ENOMEM; 2422 return -ENOMEM;
@@ -2429,12 +2425,8 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
2429 urb->dev = dev; 2425 urb->dev = dev;
2430 urb->context = usbvision; 2426 urb->context = usbvision;
2431 urb->pipe = usb_rcvisocpipe(dev, usbvision->video_endp); 2427 urb->pipe = usb_rcvisocpipe(dev, usbvision->video_endp);
2432 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
2433 urb->transfer_flags = USB_ISO_ASAP;
2434 #else
2435 urb->transfer_flags = URB_ISO_ASAP; 2428 urb->transfer_flags = URB_ISO_ASAP;
2436 urb->interval = 1; 2429 urb->interval = 1;
2437 #endif
2438 urb->transfer_buffer = usbvision->sbuf[bufIdx].data; 2430 urb->transfer_buffer = usbvision->sbuf[bufIdx].data;
2439 urb->complete = usbvision_isocIrq; 2431 urb->complete = usbvision_isocIrq;
2440 urb->number_of_packets = USBVISION_URB_FRAMES; 2432 urb->number_of_packets = USBVISION_URB_FRAMES;
@@ -2450,11 +2442,7 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
2450 2442
2451 /* Submit all URBs */ 2443 /* Submit all URBs */
2452 for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) { 2444 for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) {
2453 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
2454 errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb);
2455 #else
2456 errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb, GFP_KERNEL); 2445 errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb, GFP_KERNEL);
2457 #endif
2458 if (errCode) { 2446 if (errCode) {
2459 err("%s: usb_submit_urb(%d) failed: error %d", __FUNCTION__, bufIdx, errCode); 2447 err("%s: usb_submit_urb(%d) failed: error %d", __FUNCTION__, bufIdx, errCode);
2460 } 2448 }