status = usb_submit_urb(iforce->ctrl, GFP_ATOMIC);
if (status) {
- dev_err(&iforce->dev->dev,
+ dev_err(&iforce->intf->dev,
"usb_submit_urb failed %d\n", status);
return -1;
}
iforce->ctrl->status != -EINPROGRESS, HZ);
if (iforce->ctrl->status) {
- dev_dbg(&iforce->dev->dev,
+ dev_dbg(&iforce->intf->dev,
"iforce->ctrl->status = %d\n",
iforce->ctrl->status);
usb_unlink_urb(iforce->ctrl);
if ( (n=usb_submit_urb(iforce->out, GFP_ATOMIC)) ) {
clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
- dev_warn(&iforce->dev->dev, "usb_submit_urb failed %d\n", n);
+ dev_warn(&iforce->intf->dev, "usb_submit_urb failed %d\n", n);
}
/* The IFORCE_XMIT_RUNNING bit is not cleared here. That's intended.
static void iforce_usb_irq(struct urb *urb)
{
struct iforce *iforce = urb->context;
- struct device *dev = &iforce->dev->dev;
+ struct device *dev = &iforce->intf->dev;
int status;
switch (urb->status) {
if (urb->status) {
clear_bit(IFORCE_XMIT_RUNNING, iforce->xmit_flags);
- dev_dbg(&iforce->dev->dev, "urb->status %d, exiting\n",
+ dev_dbg(&iforce->intf->dev, "urb->status %d, exiting\n",
urb->status);
return;
}
iforce->bus = IFORCE_USB;
iforce->usbdev = dev;
+ iforce->intf = intf;
iforce->cr.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN | USB_RECIP_INTERFACE;
iforce->cr.wIndex = 0;
#endif
#ifdef CONFIG_JOYSTICK_IFORCE_USB
struct usb_device *usbdev; /* USB transfer */
+ struct usb_interface *intf;
struct urb *irq, *out, *ctrl;
struct usb_ctrlrequest cr;
#endif