upgrade to fedora-2.6.12-1.1398.FC4 + vserver 2.0.rc7
[linux-2.6.git] / drivers / usb / misc / legousbtower.c
index e83e911..7d06105 100644 (file)
@@ -391,7 +391,7 @@ static int tower_open (struct inode *inode, struct file *file)
                                  0,
                                  &reset_reply,
                                  sizeof(reset_reply),
-                                 HZ);
+                                 1000);
        if (result < 0) {
                err("LEGO USB Tower reset control request failed");
                retval = result;
@@ -405,7 +405,7 @@ static int tower_open (struct inode *inode, struct file *file)
                          dev->udev,
                          usb_rcvintpipe(dev->udev, dev->interrupt_in_endpoint->bEndpointAddress),
                          dev->interrupt_in_buffer,
-                         dev->interrupt_in_endpoint->wMaxPacketSize,
+                         le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize),
                          tower_interrupt_in_callback,
                          dev,
                          dev->interrupt_in_interval);
@@ -859,14 +859,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
                info ("udev is NULL.");
        }
 
-       /* See if the device offered us matches what we can accept */
-       if ((udev->descriptor.idVendor != LEGO_USB_TOWER_VENDOR_ID) ||
-           (udev->descriptor.idProduct != LEGO_USB_TOWER_PRODUCT_ID)) {
-               return -ENODEV;
-       }
-
-
-       /* allocate memory for our device state and intialize it */
+       /* allocate memory for our device state and initialize it */
 
        dev = kmalloc (sizeof(struct lego_usb_tower), GFP_KERNEL);
 
@@ -931,7 +924,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
                err("Couldn't allocate read_buffer");
                goto error;
        }
-       dev->interrupt_in_buffer = kmalloc (dev->interrupt_in_endpoint->wMaxPacketSize, GFP_KERNEL);
+       dev->interrupt_in_buffer = kmalloc (le16_to_cpu(dev->interrupt_in_endpoint->wMaxPacketSize), GFP_KERNEL);
        if (!dev->interrupt_in_buffer) {
                err("Couldn't allocate interrupt_in_buffer");
                goto error;
@@ -979,7 +972,7 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
                                  0,
                                  &get_version_reply,
                                  sizeof(get_version_reply),
-                                 HZ);
+                                 1000);
        if (result < 0) {
                err("LEGO USB Tower get version control request failed");
                retval = result;