summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pwc/pwc-if.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/pwc/pwc-if.c')
-rw-r--r--linux/drivers/media/video/pwc/pwc-if.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c
index 8236b2b2d..c28490ae5 100644
--- a/linux/drivers/media/video/pwc/pwc-if.c
+++ b/linux/drivers/media/video/pwc/pwc-if.c
@@ -830,13 +830,9 @@ int pwc_isoc_init(struct pwc_device *pdev)
/* Get the current alternate interface, adjust packet size */
if (!udev->actconfig)
return -EFAULT;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
- idesc = &udev->actconfig->interface[0]->altsetting[pdev->valternate];
-#else
intf = usb_ifnum_to_if(udev, 0);
if (intf)
idesc = usb_altnum_to_altsetting(intf, pdev->valternate);
-#endif
if (!idesc)
return -EFAULT;
@@ -845,11 +841,7 @@ int pwc_isoc_init(struct pwc_device *pdev)
pdev->vmax_packet_size = -1;
for (i = 0; i < idesc->desc.bNumEndpoints; i++) {
if ((idesc->endpoint[i].desc.bEndpointAddress & 0xF) == pdev->vendpoint) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
- pdev->vmax_packet_size = idesc->endpoint[i].desc.wMaxPacketSize;
-#else
pdev->vmax_packet_size = le16_to_cpu(idesc->endpoint[i].desc.wMaxPacketSize);
-#endif
break;
}
}
@@ -1472,15 +1464,9 @@ static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma)
pos += (unsigned long)pdev->image_data;
while (size > 0) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
- page = kvirt_to_pa(pos);
- if (remap_page_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
- return -EAGAIN;
-#else
page = vmalloc_to_pfn((void *)pos);
if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
return -EAGAIN;
-#endif
start += PAGE_SIZE;
pos += PAGE_SIZE;
if (size > PAGE_SIZE)
@@ -1508,13 +1494,8 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
int video_nr = -1; /* default: use next available device */
char serial_number[30], *name;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
- vendor_id = udev->descriptor.idVendor;
- product_id = udev->descriptor.idProduct;
-#else
vendor_id = le16_to_cpu(udev->descriptor.idVendor);
product_id = le16_to_cpu(udev->descriptor.idProduct);
-#endif
/* Check if we can handle this device */
PWC_DEBUG_PROBE("probe() called [%04X %04X], if %d\n",
@@ -1795,11 +1776,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
pdev->vdev->owner = THIS_MODULE;
video_set_drvdata(pdev->vdev, pdev);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
- pdev->release = udev->descriptor.bcdDevice;
-#else
pdev->release = le16_to_cpu(udev->descriptor.bcdDevice);
-#endif
PWC_DEBUG_PROBE("Release: %04x\n", pdev->release);
/* Now search device_hint[] table for a match, so we can hint a node number. */
@@ -1943,13 +1920,8 @@ module_param_named(trace, pwc_trace, int, 0644);
#endif
module_param(power_save, int, 0444);
module_param(compression, int, 0444);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
-module_param_array(leds, int, leds_nargs, 0444);
-module_param_array(dev_hint, charp, dev_hint_nargs, 0444);
-#else
module_param_array(leds, int, &leds_nargs, 0444);
module_param_array(dev_hint, charp, &dev_hint_nargs, 0444);
-#endif
MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, vga");
MODULE_PARM_DESC(fps, "Initial frames per second. Varies with model, useful range 5-30");