vserver 1.9.5.x5
[linux-2.6.git] / drivers / usb / media / ibmcam.c
index 277d65b..64eb7ca 100644 (file)
@@ -3659,17 +3659,8 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
        if (dev->descriptor.bNumConfigurations != 1)
                return -ENODEV;
 
-       /* Is it an IBM camera? */
-       if (dev->descriptor.idVendor != IBMCAM_VENDOR_ID)
-               return -ENODEV;
-       if ((dev->descriptor.idProduct != IBMCAM_PRODUCT_ID) &&
-           (dev->descriptor.idProduct != VEO_800C_PRODUCT_ID) &&
-           (dev->descriptor.idProduct != VEO_800D_PRODUCT_ID) &&
-           (dev->descriptor.idProduct != NETCAM_PRODUCT_ID))
-               return -ENODEV;
-
        /* Check the version/revision */
-       switch (dev->descriptor.bcdDevice) {
+       switch (le16_to_cpu(dev->descriptor.bcdDevice)) {
        case 0x0002:
                if (ifnum != 2)
                        return -ENODEV;
@@ -3678,8 +3669,8 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
        case 0x030A:
                if (ifnum != 0)
                        return -ENODEV;
-               if ((dev->descriptor.idProduct == NETCAM_PRODUCT_ID) ||
-                   (dev->descriptor.idProduct == VEO_800D_PRODUCT_ID))
+               if ((le16_to_cpu(dev->descriptor.idProduct) == NETCAM_PRODUCT_ID) ||
+                   (le16_to_cpu(dev->descriptor.idProduct) == VEO_800D_PRODUCT_ID))
                        model = IBMCAM_MODEL_4;
                else
                        model = IBMCAM_MODEL_2;
@@ -3691,14 +3682,14 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
                break;
        default:
                err("IBM camera with revision 0x%04x is not supported.",
-                       dev->descriptor.bcdDevice);
+                       le16_to_cpu(dev->descriptor.bcdDevice));
                return -ENODEV;
        }
 
        /* Print detailed info on what we found so far */
        do {
                char *brand = NULL;
-               switch (dev->descriptor.idProduct) {
+               switch (le16_to_cpu(dev->descriptor.idProduct)) {
                case NETCAM_PRODUCT_ID:
                        brand = "IBM NetCamera";
                        break;
@@ -3714,7 +3705,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
                        break;
                }
                info("%s USB camera found (model %d, rev. 0x%04x)",
-                    brand, model, dev->descriptor.bcdDevice);
+                    brand, model, le16_to_cpu(dev->descriptor.bcdDevice));
        } while (0);
 
        /* Validate found interface: must have one ISO endpoint */
@@ -3752,7 +3743,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
                        err("Interface %d. has ISO OUT endpoint!", ifnum);
                        return -ENODEV;
                }
-               if (endpoint->wMaxPacketSize == 0) {
+               if (le16_to_cpu(endpoint->wMaxPacketSize) == 0) {
                        if (inactInterface < 0)
                                inactInterface = i;
                        else {
@@ -3762,7 +3753,7 @@ static int ibmcam_probe(struct usb_interface *intf, const struct usb_device_id *
                } else {
                        if (actInterface < 0) {
                                actInterface = i;
-                               maxPS = endpoint->wMaxPacketSize;
+                               maxPS = le16_to_cpu(endpoint->wMaxPacketSize);
                                if (debug > 0)
                                        info("Active setting=%d. maxPS=%d.", i, maxPS);
                        } else