struct aiptek {
struct input_dev *inputdev; /* input device struct */
struct usb_device *usbdev; /* usb device struct */
+ struct usb_interface *intf; /* usb interface struct */
struct urb *urb; /* urb for incoming reports */
dma_addr_t data_dma; /* our dma stuffage */
struct aiptek_features features; /* tablet's array of features */
struct aiptek *aiptek = urb->context;
unsigned char *data = aiptek->data;
struct input_dev *inputdev = aiptek->inputdev;
+ struct usb_interface *intf = aiptek->intf;
int jitterable = 0;
int retval, macro, x, y, z, left, right, middle, p, dv, tip, bs, pck;
case -ENOENT:
case -ESHUTDOWN:
/* This urb is terminated, clean up */
- dev_dbg(&inputdev->dev,
- "%s - urb shutting down with status: %d\n",
+ dev_dbg(&intf->dev, "%s - urb shutting down with status: %d\n",
__func__, urb->status);
return;
default:
- dev_dbg(&inputdev->dev,
- "%s - nonzero urb status received: %d\n",
+ dev_dbg(&intf->dev, "%s - nonzero urb status received: %d\n",
__func__, urb->status);
goto exit;
}
1 | AIPTEK_REPORT_TOOL_UNKNOWN);
input_sync(inputdev);
} else {
- dev_dbg(&inputdev->dev, "Unknown report %d\n", data[0]);
+ dev_dbg(&intf->dev, "Unknown report %d\n", data[0]);
}
/* Jitter may occur when the user presses a button on the stlyus
exit:
retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval != 0) {
- dev_err(&inputdev->dev,
+ dev_err(&intf->dev,
"%s - usb_submit_urb failed with result %d\n",
__func__, retval);
}
if ((ret =
aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) {
- dev_dbg(&aiptek->inputdev->dev,
+ dev_dbg(&aiptek->intf->dev,
"aiptek_program: failed, tried to send: 0x%02x 0x%02x\n",
command, data);
}
if ((ret =
aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) {
- dev_dbg(&aiptek->inputdev->dev,
+ dev_dbg(&aiptek->intf->dev,
"aiptek_query failed: returned 0x%02x 0x%02x 0x%02x\n",
buf[0], buf[1], buf[2]);
ret = -EIO;
aiptek->inputdev = inputdev;
aiptek->usbdev = usbdev;
+ aiptek->intf = intf;
aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber;
aiptek->inDelay = 0;
aiptek->endDelay = 0;