diff options
Diffstat (limited to 'drivers/usb/media/pwc/pwc-if.c')
-rw-r--r-- | drivers/usb/media/pwc/pwc-if.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/usb/media/pwc/pwc-if.c b/drivers/usb/media/pwc/pwc-if.c index 4f9b0dc6fd7b..90eb26042817 100644 --- a/drivers/usb/media/pwc/pwc-if.c +++ b/drivers/usb/media/pwc/pwc-if.c | |||
@@ -62,7 +62,6 @@ | |||
62 | #include <linux/poll.h> | 62 | #include <linux/poll.h> |
63 | #include <linux/slab.h> | 63 | #include <linux/slab.h> |
64 | #include <linux/vmalloc.h> | 64 | #include <linux/vmalloc.h> |
65 | #include <linux/version.h> | ||
66 | #include <asm/io.h> | 65 | #include <asm/io.h> |
67 | 66 | ||
68 | #include "pwc.h" | 67 | #include "pwc.h" |
@@ -827,13 +826,10 @@ static int pwc_isoc_init(struct pwc_device *pdev) | |||
827 | /* Get the current alternate interface, adjust packet size */ | 826 | /* Get the current alternate interface, adjust packet size */ |
828 | if (!udev->actconfig) | 827 | if (!udev->actconfig) |
829 | return -EFAULT; | 828 | return -EFAULT; |
830 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5) | 829 | |
831 | idesc = &udev->actconfig->interface[0]->altsetting[pdev->valternate]; | ||
832 | #else | ||
833 | intf = usb_ifnum_to_if(udev, 0); | 830 | intf = usb_ifnum_to_if(udev, 0); |
834 | if (intf) | 831 | if (intf) |
835 | idesc = usb_altnum_to_altsetting(intf, pdev->valternate); | 832 | idesc = usb_altnum_to_altsetting(intf, pdev->valternate); |
836 | #endif | ||
837 | 833 | ||
838 | if (!idesc) | 834 | if (!idesc) |
839 | return -EFAULT; | 835 | return -EFAULT; |
@@ -1871,12 +1867,11 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id | |||
1871 | Info("Warning: more than 1 configuration available.\n"); | 1867 | Info("Warning: more than 1 configuration available.\n"); |
1872 | 1868 | ||
1873 | /* Allocate structure, initialize pointers, mutexes, etc. and link it to the usb_device */ | 1869 | /* Allocate structure, initialize pointers, mutexes, etc. and link it to the usb_device */ |
1874 | pdev = kmalloc(sizeof(struct pwc_device), GFP_KERNEL); | 1870 | pdev = kzalloc(sizeof(struct pwc_device), GFP_KERNEL); |
1875 | if (pdev == NULL) { | 1871 | if (pdev == NULL) { |
1876 | Err("Oops, could not allocate memory for pwc_device.\n"); | 1872 | Err("Oops, could not allocate memory for pwc_device.\n"); |
1877 | return -ENOMEM; | 1873 | return -ENOMEM; |
1878 | } | 1874 | } |
1879 | memset(pdev, 0, sizeof(struct pwc_device)); | ||
1880 | pdev->type = type_id; | 1875 | pdev->type = type_id; |
1881 | pdev->vsize = default_size; | 1876 | pdev->vsize = default_size; |
1882 | pdev->vframes = default_fps; | 1877 | pdev->vframes = default_fps; |