linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / usb / media / se401.c
index ae4b357..2ba5622 100644 (file)
@@ -122,7 +122,7 @@ static int se401_sndctrl(int set, struct usb_se401 *se401, unsigned short req,
                 0,
                 cp,
                 size,
-                HZ
+                1000
         );
 }
 
@@ -142,7 +142,7 @@ static int se401_set_feature(struct usb_se401 *se401, unsigned short selector,
                selector,
                 NULL,
                 0,
-                HZ
+                1000
         );
 }
 
@@ -162,7 +162,7 @@ static unsigned short se401_get_feature(struct usb_se401 *se401,
                 selector,
                 cp,
                 2,
-                HZ
+                1000
         );
        return cp[0]+cp[1]*256;
 }
@@ -868,13 +868,14 @@ static void usb_se401_remove_disconnected (struct usb_se401 *se401)
 
         se401->dev = NULL;
 
-       for (i=0; i<SE401_NUMSBUF; i++) if (se401->urb[i]) {
-               usb_kill_urb(se401->urb[i]);
-               usb_free_urb(se401->urb[i]);
-               se401->urb[i] = NULL;
-               kfree(se401->sbuf[i].data);
-       }
-       for (i=0; i<SE401_NUMSCRATCH; i++) if (se401->scratch[i].data) {
+       for (i=0; i<SE401_NUMSBUF; i++)
+               if (se401->urb[i]) {
+                       usb_kill_urb(se401->urb[i]);
+                       usb_free_urb(se401->urb[i]);
+                       se401->urb[i] = NULL;
+                       kfree(se401->sbuf[i].data);
+               }
+       for (i=0; i<SE401_NUMSCRATCH; i++) {
                kfree(se401->scratch[i].data);
        }
        if (se401->inturb) {
@@ -1192,6 +1193,7 @@ static struct file_operations se401_fops = {
         .read =         se401_read,
         .mmap =         se401_mmap,
        .ioctl =        se401_ioctl,
+       .compat_ioctl = v4l_compat_ioctl32,
        .llseek =       no_llseek,
 };
 static struct video_device se401_template = {
@@ -1315,20 +1317,20 @@ static int se401_probe(struct usb_interface *intf,
         interface = &intf->cur_altsetting->desc;
 
         /* Is it an se401? */
-        if (dev->descriptor.idVendor == 0x03e8 &&
-            dev->descriptor.idProduct == 0x0004) {
+        if (le16_to_cpu(dev->descriptor.idVendor) == 0x03e8 &&
+            le16_to_cpu(dev->descriptor.idProduct) == 0x0004) {
                 camera_name="Endpoints/Aox SE401";
-        } else if (dev->descriptor.idVendor == 0x0471 &&
-            dev->descriptor.idProduct == 0x030b) {
+        } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x0471 &&
+            le16_to_cpu(dev->descriptor.idProduct) == 0x030b) {
                 camera_name="Philips PCVC665K";
-        } else if (dev->descriptor.idVendor == 0x047d &&
-           dev->descriptor.idProduct == 0x5001) {
+        } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x047d &&
+           le16_to_cpu(dev->descriptor.idProduct) == 0x5001) {
                camera_name="Kensington VideoCAM 67014";
-        } else if (dev->descriptor.idVendor == 0x047d &&
-           dev->descriptor.idProduct == 0x5002) {
+        } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x047d &&
+           le16_to_cpu(dev->descriptor.idProduct) == 0x5002) {
                camera_name="Kensington VideoCAM 6701(5/7)";
-        } else if (dev->descriptor.idVendor == 0x047d &&
-           dev->descriptor.idProduct == 0x5003) {
+        } else if (le16_to_cpu(dev->descriptor.idVendor) == 0x047d &&
+           le16_to_cpu(dev->descriptor.idProduct) == 0x5003) {
                camera_name="Kensington VideoCAM 67016";
                button=0;
        } else
@@ -1354,7 +1356,7 @@ static int se401_probe(struct usb_interface *intf,
         se401->iface = interface->bInterfaceNumber;
         se401->camera_name = camera_name;
 
-       info("firmware version: %02x", dev->descriptor.bcdDevice & 255);
+       info("firmware version: %02x", le16_to_cpu(dev->descriptor.bcdDevice) & 255);
 
         if (se401_init(se401, button)) {
                kfree(se401);
@@ -1400,7 +1402,6 @@ static void se401_disconnect(struct usb_interface *intf)
 }
 
 static struct usb_driver se401_driver = {
-       .owner          = THIS_MODULE,
         .name          = "se401",
         .id_table      = device_table,
        .probe          = se401_probe,