input_report_rel(dev, REL_WHEEL, 
input_report_rel(dev, REL_WHEEL, 
static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs){	struct wacom *wacom = urb->context;	unsigned char *data = wacom->data;	struct input_dev *dev = &wacom->dev;	unsigned int t;	int idx;	int retval;	switch (urb->status) {	case 0:		/* success */		break;	case -ECONNRESET:	case -ENOENT:	case -ESHUTDOWN:		/* this urb is terminated, clean up */		dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);		return;	default:		dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);		goto exit;	}	if (data[0] != 2 && data[0] != 5 && data[0] != 6) {		dbg("wacom_intuos_irq: received unknown report #%d", data[0]);		goto exit;	}	input_regs(dev, regs);	/* tool number */	idx = data[1] & 0x01;	/* process in/out prox events */	if (wacom_intuos_inout(urb)) goto exit;	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]);	/* process general packets */	wacom_intuos_general(urb);		if ((data[1] & 0xbc) == 0xa8 || (data[1] & 0xbe) == 0xb0) {		/* 4D mouse or Lens cursor packets */		if (data[1] & 0x02) {						/* Rotation packet */			t = ((__u32)data[6] << 3) | ((data[7] >> 5) & 7);			input_report_abs(dev, ABS_RZ, (data[7] & 0x20) ? ((t - 1) / 2) : -t / 2);		} else {	 		if ((data[1] & 0x10) == 0) {				/* 4D mouse packets */				input_report_key(dev, BTN_LEFT,   data[8] & 0x01);				input_report_key(dev, BTN_MIDDLE, data[8] & 0x02);				input_report_key(dev, BTN_RIGHT,  data[8] & 0x04);				input_report_key(dev, BTN_SIDE,   data[8] & 0x20);				input_report_key(dev, BTN_EXTRA,  data[8] & 0x10);				t = ((__u32)data[6] << 2) | ((data[7] >> 6) & 3);				input_report_abs(dev, ABS_THROTTLE, (data[8] & 0x08) ? -t : t);			} else {				if (wacom->tool[idx] == BTN_TOOL_MOUSE) {	/* 2D mouse packets */						input_report_key(dev, BTN_LEFT,   data[8] & 0x04);					input_report_key(dev, BTN_MIDDLE, data[8] & 0x08);					input_report_key(dev, BTN_RIGHT,  data[8] & 0x10);					input_report_rel(dev, REL_WHEEL, 					    (-(__u32)(data[8] & 0x01) + (__u32)((data[8] & 0x02) >> 1)));				}				else {     /* Lens cursor packets */					input_report_key(dev, BTN_LEFT,   data[8] & 0x01);					input_report_key(dev, BTN_MIDDLE, data[8] & 0x02);					input_report_key(dev, BTN_RIGHT,  data[8] & 0x04);					input_report_key(dev, BTN_SIDE,   data[8] & 0x10);					input_report_key(dev, BTN_EXTRA,  data[8] & 0x08);				}			}		}	}		input_report_key(dev, wacom->tool[idx], 1);	input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]);	input_sync(dev);exit:	retval = usb_submit_urb (urb, GFP_ATOMIC);	if (retval)		err ("%s - usb_submit_urb failed with result %d",		     __FUNCTION__, retval);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/05f091ab4c8c1f12f8dd38ee789489904fea327d/wacom.c/clean/drivers/usb/input/wacom.c