input_register_device(&spaceball->dev); 
input_register_device(spaceball->dev); return 0; 
static int spaceball_connect(struct serio *serio, struct serio_driver *drv){	struct spaceball *spaceball;	int i, t, id;	int err;	if ((id = serio->id.id) > SPACEBALL_MAX_ID)		return -ENODEV;	if (!(spaceball = kmalloc(sizeof(struct spaceball), GFP_KERNEL)))		return - ENOMEM;	memset(spaceball, 0, sizeof(struct spaceball));	spaceball->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);	switch (id) {		case SPACEBALL_4000FLX:		case SPACEBALL_4000FLX_L:			spaceball->dev.keybit[LONG(BTN_0)] |= BIT(BTN_9);			spaceball->dev.keybit[LONG(BTN_A)] |= BIT(BTN_A) | BIT(BTN_B) | BIT(BTN_C) | BIT(BTN_MODE);		default:			spaceball->dev.keybit[LONG(BTN_0)] |= BIT(BTN_2) | BIT(BTN_3) | BIT(BTN_4)				| BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7) | BIT(BTN_8);		case SPACEBALL_3003C:			spaceball->dev.keybit[LONG(BTN_0)] |= BIT(BTN_1) | BIT(BTN_8);	}	for (i = 0; i < 6; i++) {		t = spaceball_axes[i];		set_bit(t, spaceball->dev.absbit);		spaceball->dev.absmin[t] = i < 3 ? -8000 : -1600;		spaceball->dev.absmax[t] = i < 3 ?  8000 :  1600;		spaceball->dev.absflat[t] = i < 3 ? 40 : 8;		spaceball->dev.absfuzz[t] = i < 3 ? 8 : 2;	}	spaceball->serio = serio;	spaceball->dev.private = spaceball;	sprintf(spaceball->phys, "%s/input0", serio->phys);	init_input_dev(&spaceball->dev);	spaceball->dev.name = spaceball_names[id];	spaceball->dev.phys = spaceball->phys;	spaceball->dev.id.bustype = BUS_RS232;	spaceball->dev.id.vendor = SERIO_SPACEBALL;	spaceball->dev.id.product = id;	spaceball->dev.id.version = 0x0100;	spaceball->dev.dev = &serio->dev;	serio_set_drvdata(serio, spaceball);	err = serio_open(serio, drv);	if (err) {		serio_set_drvdata(serio, NULL);		kfree(spaceball);		return err;	}	input_register_device(&spaceball->dev);	printk(KERN_INFO "input: %s on serio%s\n",		spaceball_names[id], serio->phys);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/17dd3f0f7aa729a042af5d3318ff9b3e7781b45b/spaceball.c/clean/drivers/input/joystick/spaceball.c