diff options
Diffstat (limited to 'drivers/usb/input/touchkitusb.c')
-rw-r--r-- | drivers/usb/input/touchkitusb.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c index 0149043..2a314b0 100644 --- a/drivers/usb/input/touchkitusb.c +++ b/drivers/usb/input/touchkitusb.c @@ -92,8 +92,7 @@ static inline int touchkit_get_y(char *data) /* processes one input packet. */ -static void touchkit_process_pkt(struct touchkit_usb *touchkit, - struct pt_regs *regs, char *pkt) +static void touchkit_process_pkt(struct touchkit_usb *touchkit, char *pkt) { int x, y; @@ -109,7 +108,6 @@ static void touchkit_process_pkt(struct touchkit_usb *touchkit, y = touchkit_get_y(pkt); } - input_regs(touchkit->input, regs); input_report_key(touchkit->input, BTN_TOUCH, touchkit_get_touched(pkt)); input_report_abs(touchkit->input, ABS_X, x); input_report_abs(touchkit->input, ABS_Y, y); @@ -130,8 +128,7 @@ static int touchkit_get_pkt_len(char *buf) return 0; } -static void touchkit_process(struct touchkit_usb *touchkit, int len, - struct pt_regs *regs) +static void touchkit_process(struct touchkit_usb *touchkit, int len) { char *buffer; int pkt_len, buf_len, pos; @@ -153,7 +150,7 @@ static void touchkit_process(struct touchkit_usb *touchkit, int len, /* append, process */ tmp = pkt_len - touchkit->buf_len; memcpy(touchkit->buffer + touchkit->buf_len, touchkit->data, tmp); - touchkit_process_pkt(touchkit, regs, touchkit->buffer); + touchkit_process_pkt(touchkit, touchkit->buffer); buffer = touchkit->data + tmp; buf_len = len - tmp; @@ -181,7 +178,7 @@ static void touchkit_process(struct touchkit_usb *touchkit, int len, /* full packet: process */ if (likely(pkt_len <= buf_len)) { - touchkit_process_pkt(touchkit, regs, buffer + pos); + touchkit_process_pkt(touchkit, buffer + pos); } else { /* incomplete packet: save in buffer */ memcpy(touchkit->buffer, buffer + pos, buf_len - pos); @@ -192,7 +189,7 @@ static void touchkit_process(struct touchkit_usb *touchkit, int len, } -static void touchkit_irq(struct urb *urb, struct pt_regs *regs) +static void touchkit_irq(struct urb *urb) { struct touchkit_usb *touchkit = urb->context; int retval; @@ -201,7 +198,7 @@ static void touchkit_irq(struct urb *urb, struct pt_regs *regs) case 0: /* success */ break; - case -ETIMEDOUT: + case -ETIME: /* this urb is timing out */ dbg("%s - urb timed out - was the device unplugged?", __FUNCTION__); @@ -219,7 +216,7 @@ static void touchkit_irq(struct urb *urb, struct pt_regs *regs) goto exit; } - touchkit_process(touchkit, urb->actual_length, regs); + touchkit_process(touchkit, urb->actual_length); exit: retval = usb_submit_urb(urb, GFP_ATOMIC); @@ -251,7 +248,7 @@ static int touchkit_alloc_buffers(struct usb_device *udev, struct touchkit_usb *touchkit) { touchkit->data = usb_buffer_alloc(udev, TOUCHKIT_REPORT_DATA_SIZE, - SLAB_ATOMIC, &touchkit->data_dma); + GFP_ATOMIC, &touchkit->data_dma); if (!touchkit->data) return -1; |