aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/acecad.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/input/acecad.c')
-rw-r--r--drivers/usb/input/acecad.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/usb/input/acecad.c b/drivers/usb/input/acecad.c
index ebcf7c955800..13532f3e3efc 100644
--- a/drivers/usb/input/acecad.c
+++ b/drivers/usb/input/acecad.c
@@ -31,6 +31,7 @@
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/usb.h> 33#include <linux/usb.h>
34#include <linux/usb_input.h>
34 35
35/* 36/*
36 * Version Information 37 * Version Information
@@ -87,8 +88,8 @@ static void usb_acecad_irq(struct urb *urb, struct pt_regs *regs)
87 if (prox) { 88 if (prox) {
88 int x = data[1] | (data[2] << 8); 89 int x = data[1] | (data[2] << 8);
89 int y = data[3] | (data[4] << 8); 90 int y = data[3] | (data[4] << 8);
90 /*Pressure should compute the same way for flair and 302*/ 91 /* Pressure should compute the same way for flair and 302 */
91 int pressure = data[5] | ((int)data[6] << 8); 92 int pressure = data[5] | (data[6] << 8);
92 int touch = data[0] & 0x01; 93 int touch = data[0] & 0x01;
93 int stylus = (data[0] & 0x10) >> 4; 94 int stylus = (data[0] & 0x10) >> 4;
94 int stylus2 = (data[0] & 0x20) >> 5; 95 int stylus2 = (data[0] & 0x20) >> 5;
@@ -104,9 +105,9 @@ static void usb_acecad_irq(struct urb *urb, struct pt_regs *regs)
104 input_sync(dev); 105 input_sync(dev);
105 106
106resubmit: 107resubmit:
107 status = usb_submit_urb (urb, GFP_ATOMIC); 108 status = usb_submit_urb(urb, GFP_ATOMIC);
108 if (status) 109 if (status)
109 err ("can't resubmit intr, %s-%s/input0, status %d", 110 err("can't resubmit intr, %s-%s/input0, status %d",
110 acecad->usbdev->bus->bus_name, acecad->usbdev->devpath, status); 111 acecad->usbdev->bus->bus_name, acecad->usbdev->devpath, status);
111} 112}
112 113
@@ -212,10 +213,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
212 213
213 acecad->dev.name = acecad->name; 214 acecad->dev.name = acecad->name;
214 acecad->dev.phys = acecad->phys; 215 acecad->dev.phys = acecad->phys;
215 acecad->dev.id.bustype = BUS_USB; 216 usb_to_input_id(dev, &acecad->dev.id);
216 acecad->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);
217 acecad->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);
218 acecad->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);
219 acecad->dev.dev = &intf->dev; 217 acecad->dev.dev = &intf->dev;
220 218
221 usb_fill_int_urb(acecad->irq, dev, pipe, 219 usb_fill_int_urb(acecad->irq, dev, pipe,