if ((ati_remote->old_data[0] == data[1]) && (ati_remote->old_data[1] == data[2]) && ((ati_remote->old_jiffies + FILTER_TIME) > jiffies)) { 
if ((ati_remote->old_data[0] == data[1]) && (ati_remote->old_data[1] == data[2]) && ((ati_remote->old_jiffies + FILTER_TIME) > jiffies)) { 
static void ati_remote_input_report(struct urb *urb, struct pt_regs *regs)	{	struct ati_remote *ati_remote = urb->context;	unsigned char *data= ati_remote->inbuf;	struct input_dev *dev = &ati_remote->idev; 	int index, acc;	int remote_num;		/* Deal with strange looking inputs */	if ( (urb->actual_length != 4) || (data[0] != 0x14) || 		((data[3] & 0x0f) != 0x00) ) {		ati_remote_dump(data, urb->actual_length);		return;	}	/* Mask unwanted remote channels.  */	/* note: remote_num is 0-based, channel 1 on remote == 0 here */	remote_num = (data[3] >> 4) & 0x0f;        if (channel_mask & (1 << (remote_num + 1))) { 		dbginfo(&ati_remote->interface->dev,			"Masked input from channel 0x%02x: data %02x,%02x, mask= 0x%02lx\n",			remote_num, data[1], data[2], channel_mask);		return;	}	/* Look up event code index in translation table */	index = ati_remote_event_lookup(remote_num, data[1], data[2]);	if (index < 0) {		dev_warn(&ati_remote->interface->dev, 			 "Unknown input from channel 0x%02x: data %02x,%02x\n", 			 remote_num, data[1], data[2]);		return;	} 	dbginfo(&ati_remote->interface->dev, 		"channel 0x%02x; data %02x,%02x; index %d; keycode %d\n",		remote_num, data[1], data[2], index, ati_remote_tbl[index].code);		if (ati_remote_tbl[index].kind == KIND_LITERAL) {		input_regs(dev, regs);		input_event(dev, ati_remote_tbl[index].type,			ati_remote_tbl[index].code,			ati_remote_tbl[index].value);		input_sync(dev);				ati_remote->old_jiffies = jiffies;		return;	}		if (ati_remote_tbl[index].kind == KIND_FILTERED) {		/* Filter duplicate events which happen "too close" together. */		if ((ati_remote->old_data[0] == data[1]) && 	 		(ati_remote->old_data[1] == data[2]) && 	 		((ati_remote->old_jiffies + FILTER_TIME) > jiffies)) {			ati_remote->repeat_count++;		} 		else {			ati_remote->repeat_count = 0;		}				ati_remote->old_data[0] = data[1];		ati_remote->old_data[1] = data[2];		ati_remote->old_jiffies = jiffies;		if ((ati_remote->repeat_count > 0)		    && (ati_remote->repeat_count < 5))			return;				input_regs(dev, regs);		input_event(dev, ati_remote_tbl[index].type,			ati_remote_tbl[index].code, 1);		input_event(dev, ati_remote_tbl[index].type,			ati_remote_tbl[index].code, 0);		input_sync(dev);		return;	}					/* 	 * Other event kinds are from the directional control pad, and have an	 * acceleration factor applied to them.  Without this acceleration, the	 * control pad is mostly unusable.	 * 	 * If elapsed time since last event is > 1/4 second, user "stopped",	 * so reset acceleration. Otherwise, user is probably holding the control	 * pad down, so we increase acceleration, ramping up over two seconds to	 * a maximum speed.  The acceleration curve is #defined above.	 */	if ((jiffies - ati_remote->old_jiffies) > (HZ >> 2)) {		acc = 1;		ati_remote->acc_jiffies = jiffies;	}	else if ((jiffies - ati_remote->acc_jiffies) < (HZ >> 3))  acc = accel[0];	else if ((jiffies - ati_remote->acc_jiffies) < (HZ >> 2))  acc = accel[1];	else if ((jiffies - ati_remote->acc_jiffies) < (HZ >> 1))  acc = accel[2];	else if ((jiffies - ati_remote->acc_jiffies) < HZ )        acc = accel[3];	else if ((jiffies - ati_remote->acc_jiffies) < HZ+(HZ>>1)) acc = accel[4];	else if ((jiffies - ati_remote->acc_jiffies) < (HZ << 1))  acc = accel[5];	else acc = accel[6];	input_regs(dev, regs);	switch (ati_remote_tbl[index].kind) {	case KIND_ACCEL:		input_event(dev, ati_remote_tbl[index].type,			ati_remote_tbl[index].code,			ati_remote_tbl[index].value * acc);		break;	case KIND_LU:		input_report_rel(dev, REL_X, -acc);		input_report_rel(dev, REL_Y, -acc);		break;	case KIND_RU:		input_report_rel(dev, REL_X, acc);		input_report_rel(dev, REL_Y, -acc);		break;	case KIND_LD:		input_report_rel(dev, REL_X, -acc);		input_report_rel(dev, REL_Y, acc);		break;	case KIND_RD:		input_report_rel(dev, REL_X, acc);		input_report_rel(dev, REL_Y, acc);		break;	default:		dev_dbg(&ati_remote->interface->dev, "ati_remote kind=%d\n", 			ati_remote_tbl[index].kind);	}	input_sync(dev);	ati_remote->old_jiffies = jiffies;	ati_remote->old_data[0] = data[1];	ati_remote->old_data[1] = data[2];}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/05f091ab4c8c1f12f8dd38ee789489904fea327d/ati_remote.c/clean/drivers/usb/input/ati_remote.c