urbp = acep->urbp;
urbp->transfer_flags &= ~URB_ASYNC_UNLINK;
dbg ("unlink active urb");
- usb_unlink_urb (urbp);
+ usb_kill_urb (urbp);
}
}
static int auerswald_int_open (pauerswald_t cp)
{
int ret;
- struct usb_endpoint_descriptor *ep;
+ struct usb_host_endpoint *ep;
int irqsize;
dbg ("auerswald_int_open");
- ep = usb_epnum_to_ep_desc (cp->usbdev, USB_DIR_IN | AU_IRQENDP);
+ ep = cp->usbdev->ep_in[AU_IRQENDP];
if (!ep) {
ret = -EFAULT;
goto intoend;
}
- irqsize = ep->wMaxPacketSize;
+ irqsize = le16_to_cpu(ep->desc.wMaxPacketSize);
cp->irqsize = irqsize;
/* allocate the urb and data buffer */
}
}
/* setup urb */
- usb_fill_int_urb (cp->inturbp, cp->usbdev, usb_rcvintpipe (cp->usbdev,AU_IRQENDP), cp->intbufp, irqsize, auerswald_int_complete, cp, ep->bInterval);
+ usb_fill_int_urb (cp->inturbp, cp->usbdev,
+ usb_rcvintpipe (cp->usbdev,AU_IRQENDP), cp->intbufp,
+ irqsize, auerswald_int_complete, cp, ep->desc.bInterval);
/* start the urb */
cp->inturbp->status = 0; /* needed! */
ret = usb_submit_urb (cp->inturbp, GFP_KERNEL);
endpoint. This function returns 0 if successful or an error code.
NOTE: no mutex please!
*/
-static int auerswald_int_release (pauerswald_t cp)
+static void auerswald_int_release (pauerswald_t cp)
{
- int ret = 0;
dbg ("auerswald_int_release");
/* stop the int endpoint */
- if (cp->inturbp) {
- ret = usb_unlink_urb (cp->inturbp);
- if (ret)
- dbg ("nonzero int unlink result received: %d", ret);
- }
+ if (cp->inturbp)
+ usb_kill_urb (cp->inturbp);
/* deallocate memory */
auerswald_int_free (cp);
-
- return ret;
}
/* --------------------------------------------------------------------- */
int ret;
dbg ("probe: vendor id 0x%x, device id 0x%x",
- usbdev->descriptor.idVendor, usbdev->descriptor.idProduct);
-
- /* See if the device offered us matches that we can accept */
- if (usbdev->descriptor.idVendor != ID_AUERSWALD)
- return -ENODEV;
+ le16_to_cpu(usbdev->descriptor.idVendor),
+ le16_to_cpu(usbdev->descriptor.idProduct));
/* we use only the first -and only- interface */
if (intf->altsetting->desc.bInterfaceNumber != 0)
cp->dtindex = intf->minor;
/* Get the usb version of the device */
- cp->version = cp->usbdev->descriptor.bcdDevice;
+ cp->version = le16_to_cpu(cp->usbdev->descriptor.bcdDevice);
dbg ("Version is %X", cp->version);
/* allow some time to settle the device */