struct input_dev *dev = &spaceball->dev; 
struct input_dev *dev = spaceball->dev; 
static void spaceball_process_packet(struct spaceball* spaceball, struct pt_regs *regs){	struct input_dev *dev = &spaceball->dev;	unsigned char *data = spaceball->data;	int i;	if (spaceball->idx < 2) return;	input_regs(dev, regs);	switch (spaceball->data[0]) {		case 'D':					/* Ball data */			if (spaceball->idx != 15) return;			for (i = 0; i < 6; i++)				input_report_abs(dev, spaceball_axes[i],					(__s16)((data[2 * i + 3] << 8) | data[2 * i + 2]));			break;		case 'K':					/* Button data */			if (spaceball->idx != 3) return;			input_report_key(dev, BTN_1, (data[2] & 0x01) || (data[2] & 0x20));			input_report_key(dev, BTN_2, data[2] & 0x02);			input_report_key(dev, BTN_3, data[2] & 0x04);			input_report_key(dev, BTN_4, data[2] & 0x08);			input_report_key(dev, BTN_5, data[1] & 0x01);			input_report_key(dev, BTN_6, data[1] & 0x02);			input_report_key(dev, BTN_7, data[1] & 0x04);			input_report_key(dev, BTN_8, data[1] & 0x10);			break;		case '.':					/* Advanced button data */			if (spaceball->idx != 3) return;			input_report_key(dev, BTN_1, data[2] & 0x01);			input_report_key(dev, BTN_2, data[2] & 0x02);			input_report_key(dev, BTN_3, data[2] & 0x04);			input_report_key(dev, BTN_4, data[2] & 0x08);			input_report_key(dev, BTN_5, data[2] & 0x10);			input_report_key(dev, BTN_6, data[2] & 0x20);			input_report_key(dev, BTN_7, data[2] & 0x80);			input_report_key(dev, BTN_8, data[1] & 0x01);			input_report_key(dev, BTN_9, data[1] & 0x02);			input_report_key(dev, BTN_A, data[1] & 0x04);			input_report_key(dev, BTN_B, data[1] & 0x08);			input_report_key(dev, BTN_C, data[1] & 0x10);			input_report_key(dev, BTN_MODE, data[1] & 0x20);			break;		case 'E':					/* Device error */			spaceball->data[spaceball->idx - 1] = 0;			printk(KERN_ERR "spaceball: Device error. [%s]\n", spaceball->data + 1);			break;		case '?':					/* Bad command packet */			spaceball->data[spaceball->idx - 1] = 0;			printk(KERN_ERR "spaceball: Bad command. [%s]\n", spaceball->data + 1);			break;	}	input_sync(dev);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/17dd3f0f7aa729a042af5d3318ff9b3e7781b45b/spaceball.c/clean/drivers/input/joystick/spaceball.c