input_regs(dev, regs);
input_report_key(dev, BTN_TOOL_PEN, 1);
- input_report_abs(dev, ABS_X, le16_to_cpu(get_unaligned((u16 *) &data[1])));
- input_report_abs(dev, ABS_Y, le16_to_cpu(get_unaligned((u16 *) &data[3])));
+ input_report_abs(dev, ABS_X, le16_to_cpu(get_unaligned((__le16 *) &data[1])));
+ input_report_abs(dev, ABS_Y, le16_to_cpu(get_unaligned((__le16 *) &data[3])));
input_report_abs(dev, ABS_PRESSURE, (signed char)data[6] + 127);
input_report_key(dev, BTN_TOUCH, ((signed char)data[6] > -80) && !(data[5] & 0x20));
input_report_key(dev, BTN_STYLUS, (data[5] & 0x40));
if (data[0] != 2)
dbg("wacom_graphire_irq: received unknown report #%d", data[0]);
- x = le16_to_cpu(*(u16 *) &data[2]);
- y = le16_to_cpu(*(u16 *) &data[4]);
+ x = le16_to_cpu(*(__le16 *) &data[2]);
+ y = le16_to_cpu(*(__le16 *) &data[4]);
input_regs(dev, regs);
input_report_abs(dev, ABS_Y, y);
}
- input_report_abs(dev, ABS_PRESSURE, le16_to_cpu(*(u16 *) &data[6]));
+ input_report_abs(dev, ABS_PRESSURE, le16_to_cpu(*(__le16 *) &data[6]));
input_report_key(dev, BTN_TOUCH, data[1] & 0x01);
input_report_key(dev, BTN_STYLUS, data[1] & 0x02);
input_report_key(dev, BTN_STYLUS2, data[1] & 0x04);
goto exit;
}
- input_report_abs(dev, ABS_X, be16_to_cpu(*(u16 *) &data[2]));
- input_report_abs(dev, ABS_Y, be16_to_cpu(*(u16 *) &data[4]));
+ input_report_abs(dev, ABS_X, be16_to_cpu(*(__be16 *) &data[2]));
+ input_report_abs(dev, ABS_Y, be16_to_cpu(*(__be16 *) &data[4]));
input_report_abs(dev, ABS_DISTANCE, data[9]);
if ((data[1] & 0xb8) == 0xa0) { /* general pen packet */
__FUNCTION__, retval);
}
-struct wacom_features wacom_features[] = {
+static struct wacom_features wacom_features[] = {
{ "Wacom Penpartner", 7, 5040, 3780, 255, 32, 0, wacom_penpartner_irq },
{ "Wacom Graphire", 8, 10206, 7422, 511, 32, 1, wacom_graphire_irq },
{ "Wacom Graphire2 4x5", 8, 10206, 7422, 511, 32, 1, wacom_graphire_irq },
{ }
};
-struct usb_device_id wacom_ids[] = {
+static struct usb_device_id wacom_ids[] = {
{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x00) },
{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x10) },
{ USB_DEVICE(USB_VENDOR_ID_WACOM, 0x11) },
struct wacom *wacom = dev->private;
if (!--wacom->open)
- usb_unlink_urb(wacom->irq);
+ usb_kill_urb(wacom->irq);
}
static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id)
wacom->dev.name = wacom->features->name;
wacom->dev.phys = wacom->phys;
wacom->dev.id.bustype = BUS_USB;
- wacom->dev.id.vendor = dev->descriptor.idVendor;
- wacom->dev.id.product = dev->descriptor.idProduct;
- wacom->dev.id.version = dev->descriptor.bcdDevice;
+ wacom->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
+ wacom->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);
+ wacom->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
wacom->dev.dev = &intf->dev;
wacom->usbdev = dev;
usb_set_intfdata(intf, NULL);
if (wacom) {
- usb_unlink_urb(wacom->irq);
+ usb_kill_urb(wacom->irq);
input_unregister_device(&wacom->dev);
usb_free_urb(wacom->irq);
usb_buffer_free(interface_to_usbdev(intf), 10, wacom->data, wacom->data_dma);