printk(KERN_INFO "input: Logitech WingMan Warrior on %s\n", serio->phys);  return 0; 
fail:	serio_set_drvdata(serio, NULL); input_free_device(input_dev); kfree(warrior); return err; 
static int warrior_connect(struct serio *serio, struct serio_driver *drv){	struct warrior *warrior;	int i;	int err;	if (!(warrior = kmalloc(sizeof(struct warrior), GFP_KERNEL)))		return -ENOMEM;	memset(warrior, 0, sizeof(struct warrior));	warrior->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS);	warrior->dev.keybit[LONG(BTN_TRIGGER)] = BIT(BTN_TRIGGER) | BIT(BTN_THUMB) | BIT(BTN_TOP) | BIT(BTN_TOP2);	warrior->dev.relbit[0] = BIT(REL_DIAL);	warrior->dev.absbit[0] = BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_THROTTLE) | BIT(ABS_HAT0X) | BIT(ABS_HAT0Y);	sprintf(warrior->phys, "%s/input0", serio->phys);	init_input_dev(&warrior->dev);	warrior->dev.name = warrior_name;	warrior->dev.phys = warrior->phys;	warrior->dev.id.bustype = BUS_RS232;	warrior->dev.id.vendor = SERIO_WARRIOR;	warrior->dev.id.product = 0x0001;	warrior->dev.id.version = 0x0100;	warrior->dev.dev = &serio->dev;	for (i = 0; i < 2; i++) {		warrior->dev.absmax[ABS_X+i] = -64;		warrior->dev.absmin[ABS_X+i] =  64;		warrior->dev.absflat[ABS_X+i] = 8;	}	warrior->dev.absmax[ABS_THROTTLE] = -112;	warrior->dev.absmin[ABS_THROTTLE] =  112;	for (i = 0; i < 2; i++) {		warrior->dev.absmax[ABS_HAT0X+i] = -1;		warrior->dev.absmin[ABS_HAT0X+i] =  1;	}	warrior->dev.private = warrior;	serio_set_drvdata(serio, warrior);	err = serio_open(serio, drv);	if (err) {		serio_set_drvdata(serio, NULL);		kfree(warrior);		return err;	}	input_register_device(&warrior->dev);	printk(KERN_INFO "input: Logitech WingMan Warrior on %s\n", serio->phys);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/17dd3f0f7aa729a042af5d3318ff9b3e7781b45b/warrior.c/clean/drivers/input/joystick/warrior.c