struct input_dev *dev = &mouse->dev; 
struct input_dev *dev = mouse->dev; 
vsxxxaa_handle_POR_packet (struct vsxxxaa *mouse, struct pt_regs *regs){	struct input_dev *dev = &mouse->dev;	unsigned char *buf = mouse->buf;	int left, middle, right;	unsigned char error;	/*	 * Check for Power-On-Reset packets. These are sent out	 * after plugging the mouse in, or when explicitely	 * requested by sending 'T'.	 *	 * [0]:	1	0	1	0	R3	R2	R1	R0	 * [1]:	0	M2	M1	M0	D3	D2	D1	D0	 * [2]:	0	E6	E5	E4	E3	E2	E1	E0	 * [3]:	0	0	0	0	0	Left	Middle	Right	 *	 * M: manufacturer location code	 * R: revision code	 * E: Error code. If it's in the range of 0x00..0x1f, only some	 *    minor problem occured. Errors >= 0x20 are considered bad	 *    and the device may not work properly...	 * D: <0010> == mouse, <0100> == tablet	 */	mouse->version = buf[0] & 0x0f;	mouse->country = (buf[1] >> 4) & 0x07;	mouse->type = buf[1] & 0x0f;	error = buf[2] & 0x7f;	/*	 * Get button state. It's the low three bits	 * (for three buttons) of byte 0. Maybe even the bit <3>	 * has some meaning if a tablet is attached.	 */	left	= (buf[0] & 0x04)? 1: 0;	middle	= (buf[0] & 0x02)? 1: 0;	right	= (buf[0] & 0x01)? 1: 0;	vsxxxaa_drop_bytes (mouse, 4);	vsxxxaa_detection_done (mouse);	if (error <= 0x1f) {		/* No (serious) error. Report buttons */		input_regs (dev, regs);		input_report_key (dev, BTN_LEFT, left);		input_report_key (dev, BTN_MIDDLE, middle);		input_report_key (dev, BTN_RIGHT, right);		input_report_key (dev, BTN_TOUCH, 0);		input_sync (dev);		if (error != 0)			printk (KERN_INFO "Your %s on %s reports error=0x%02x\n",					mouse->name, mouse->phys, error);	}	/*	 * If the mouse was hot-plugged, we need to force differential mode	 * now... However, give it a second to recover from it's reset.	 */	printk (KERN_NOTICE "%s on %s: Forceing standard packet format, "			"incremental streaming mode and 72 samples/sec\n",			mouse->name, mouse->phys);	mouse->serio->write (mouse->serio, 'S');	/* Standard format */	mdelay (50);	mouse->serio->write (mouse->serio, 'R');	/* Incremental */	mdelay (50);	mouse->serio->write (mouse->serio, 'L');	/* 72 samples/sec */}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2e5b636bb5f8dacbb91d08544e2c41ebcad5dace/vsxxxaa.c/clean/drivers/input/mouse/vsxxxaa.c