X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fusb%2Finput%2Ftouchkitusb.c;h=2a314b0659225cc4fff70fe716427027fdd06e4f;hb=refs%2Fheads%2Fvserver;hp=697c5e573a115cbe1d38548448032705f4846543;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c index 697c5e573..2a314b065 100644 --- a/drivers/usb/input/touchkitusb.c +++ b/drivers/usb/input/touchkitusb.c @@ -24,14 +24,11 @@ //#define DEBUG -#include #include #include -#include #include #include -#include -#include +#include #define TOUCHKIT_MIN_XC 0x0 #define TOUCHKIT_MAX_XC 0x07ff @@ -95,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; @@ -112,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); @@ -133,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; @@ -156,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; @@ -184,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); @@ -195,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; @@ -204,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__); @@ -222,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); @@ -254,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;