struct input_dev *dev = &ts->dev; 
struct input_dev *dev = &ts->dev; 
static void h3600ts_process_packet(struct h3600_dev *ts, struct pt_regs *regs){        struct input_dev *dev = &ts->dev;	static int touched = 0;	int key, down = 0;	input_regs(dev, regs);        switch (ts->event) {                /*                   Buttons - returned as a single byte                        7 6 5 4 3 2 1 0                        S x x x N N N N                   S       switch state ( 0=pressed 1=released)                   x       Unused.                   NNNN    switch number 0-15                Note: This is true for non interrupt generated key events.                */                case KEYBD_ID:			down = (ts->buf[0] & 0x80) ? 0 : 1;			switch (ts->buf[0] & 0x7f) {				case H3600_SCANCODE_RECORD:					key = KEY_RECORD;					break;				case H3600_SCANCODE_CALENDAR:					key = KEY_PROG1;                                        break;				case H3600_SCANCODE_CONTACTS:					key = KEY_PROG2;                                        break;				case H3600_SCANCODE_Q:					key = KEY_Q;                                        break;				case H3600_SCANCODE_START:					key = KEY_PROG3;                                        break;				case H3600_SCANCODE_UP:					key = KEY_UP;                                        break;				case H3600_SCANCODE_RIGHT:					key = KEY_RIGHT;                                        break;				case H3600_SCANCODE_LEFT:					key = KEY_LEFT;                                        break;				case H3600_SCANCODE_DOWN:					key = KEY_DOWN;                                        break;				default:					key = 0;			}                        if (key)                        	input_report_key(dev, key, down);                        break;                /*                 * Native touchscreen event data is formatted as shown below:-                 *                 *      +-------+-------+-------+-------+                 *      | Xmsb  | Xlsb  | Ymsb  | Ylsb  |                 *      +-------+-------+-------+-------+                 *       byte 0    1       2       3                 */                case TOUCHS_ID:			if (!touched) {				input_report_key(dev, BTN_TOUCH, 1);				touched = 1;			}			if (ts->len) {				unsigned short x, y;				x = ts->buf[0]; x <<= 8; x += ts->buf[1];                                y = ts->buf[2]; y <<= 8; y += ts->buf[3];                       		input_report_abs(dev, ABS_X, x);                       		input_report_abs(dev, ABS_Y, y);			} else {		               	input_report_key(dev, BTN_TOUCH, 0);				touched = 0;			}                        break;		default:			/* Send a non input event elsewhere */			break;        }	input_sync(dev);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/de1b963a416232bf429550ee475d6b9a34b66309/h3600_ts_input.c/buggy/drivers/input/touchscreen/h3600_ts_input.c