if ((wacom->features->type == CINTIQ) && !(data[1] & 0x40)) return; 
if ((wacom->features->type == CINTIQ) && !(data[1] & 0x40)) return; 
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 && data[0] != 12) {		dbg("wacom_intuos_irq: received unknown report #%d", data[0]);		goto exit;	}	input_regs(dev, regs);	/* tool number */	idx = data[1] & 0x01;	/* pad packets. Works as a second tool and is always in prox */	if (data[0] == 12)	{		/* initiate the pad as a device */		if (wacom->tool[1] != BTN_TOOL_FINGER)		{			wacom->tool[1] = BTN_TOOL_FINGER;			input_report_key(dev, wacom->tool[1], 1);		}		input_report_key(dev, BTN_0, (data[5] & 0x01));		input_report_key(dev, BTN_1, (data[5] & 0x02));		input_report_key(dev, BTN_2, (data[5] & 0x04));		input_report_key(dev, BTN_3, (data[5] & 0x08));		input_report_key(dev, BTN_4, (data[6] & 0x01));		input_report_key(dev, BTN_5, (data[6] & 0x02));		input_report_key(dev, BTN_6, (data[6] & 0x04));		input_report_key(dev, BTN_7, (data[6] & 0x08));		input_report_abs(dev, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]);		input_report_abs(dev, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]);		input_event(dev, EV_MSC, MSC_SERIAL, 0xffffffff);		input_sync(dev);		goto exit;	}	/* process in/out prox events */	if (wacom_intuos_inout(urb)) goto exit;	/* Cintiq doesn't send data when RDY bit isn't set */	if ((wacom->features->type == CINTIQ) && !(data[1] & 0x40)) return;	if(wacom->features->type >= INTUOS3)	{		input_report_abs(dev, ABS_X, (data[2] << 9) | (data[3] << 1) | ((data[9] >> 1) & 1));		input_report_abs(dev, ABS_Y, (data[4] << 9) | (data[5] << 1) | (data[9] & 1));		input_report_abs(dev, ABS_DISTANCE, ((data[9] >> 2) & 0x3f));	}	else	{		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] >> 3) & 0x1f));	}	/* process general packets */	wacom_intuos_general(urb);	/* 4D mouse, 2D mouse, marker pen rotation, or Lens cursor packets */	if ((data[1] & 0xbc) == 0xa8 || (data[1] & 0xbe) == 0xb0) {		/* Rotation packet */		if (data[1] & 0x02)		{			if(wacom->features->type >= INTUOS3)			{				/* I3 marker pen rotation reported as wheel				 * due to valuator limitation				 */				t = (data[6] << 3) | ((data[7] >> 5) & 7);				t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) :					((t-1) / 2 + 450)) : (450 - t / 2) ;				input_report_abs(dev, ABS_WHEEL, t);			}			else			{				/* 4D mouse rotation packet */				t = (data[6] << 3) | ((data[7] >> 5) & 7);				input_report_abs(dev, ABS_RZ, (data[7] & 0x20) ?					((t - 1) / 2) : -t / 2);			}		}		/* 4D mouse packets */		else if ( !(data[1] & 0x10) && wacom->features->type < INTUOS3)		{			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 = (data[6] << 2) | ((data[7] >> 6) & 3);			input_report_abs(dev, ABS_THROTTLE, (data[8] & 0x08) ? -t : t);		}		/* 2D mouse packets */		else if (wacom->tool[idx] == BTN_TOOL_MOUSE)		{			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, ((data[8] & 0x02) >> 1)					    	 - (data[8] & 0x01));			/* I3 2D mouse side buttons */			if (wacom->features->type == INTUOS3)			{				input_report_key(dev, BTN_SIDE,   data[8] & 0x40);				input_report_key(dev, BTN_EXTRA,  data[8] & 0x20);			}		}		/* Lens cursor packets */		else if (wacom->features->type < INTUOS3)		{			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);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/e5119885f00874453e837e3407014b73de2f4741/wacom.c/buggy/drivers/usb/input/wacom.c