input_set_abs_params(&guillemot->dev, t, 0, 255, 0, 0); 
input_set_abs_params(input_dev, t, 0, 255, 0, 0); 
static int guillemot_connect(struct gameport *gameport, struct gameport_driver *drv){	struct guillemot *guillemot;	u8 data[GUILLEMOT_MAX_LENGTH];	int i, t;	int err;	if (!(guillemot = kzalloc(sizeof(struct guillemot), GFP_KERNEL)))		return -ENOMEM;	guillemot->gameport = gameport;	gameport_set_drvdata(gameport, guillemot);	err = gameport_open(gameport, drv, GAMEPORT_MODE_RAW);	if (err)		goto fail1;	i = guillemot_read_packet(gameport, data);	if (i != GUILLEMOT_MAX_LENGTH * 8 || data[0] != 0x55 || data[16] != 0xaa) {		err = -ENODEV;		goto fail2;	}	for (i = 0; guillemot_type[i].name; i++)		if (guillemot_type[i].id == data[11])			break;	if (!guillemot_type[i].name) {		printk(KERN_WARNING "guillemot.c: Unknown joystick on %s. [ %02x%02x:%04x, ver %d.%02d ]\n",			gameport->phys, data[12], data[13], data[11], data[14], data[15]);		err = -ENODEV;		goto fail2;	}	gameport_set_poll_handler(gameport, guillemot_poll);	gameport_set_poll_interval(gameport, 20);	sprintf(guillemot->phys, "%s/input0", gameport->phys);	guillemot->type = guillemot_type + i;	guillemot->dev.private = guillemot;	guillemot->dev.open = guillemot_open;	guillemot->dev.close = guillemot_close;	guillemot->dev.name = guillemot_type[i].name;	guillemot->dev.phys = guillemot->phys;	guillemot->dev.id.bustype = BUS_GAMEPORT;	guillemot->dev.id.vendor = GAMEPORT_ID_VENDOR_GUILLEMOT;	guillemot->dev.id.product = guillemot_type[i].id;	guillemot->dev.id.version = (int)data[14] << 8 | data[15];	guillemot->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);	for (i = 0; (t = guillemot->type->abs[i]) >= 0; i++)		input_set_abs_params(&guillemot->dev, t, 0, 255, 0, 0);	if (guillemot->type->hat) {		input_set_abs_params(&guillemot->dev, ABS_HAT0X, -1, 1, 0, 0);		input_set_abs_params(&guillemot->dev, ABS_HAT0Y, -1, 1, 0, 0);	}	for (i = 0; (t = guillemot->type->btn[i]) >= 0; i++)		set_bit(t, guillemot->dev.keybit);	input_register_device(&guillemot->dev);	printk(KERN_INFO "input: %s ver %d.%02d on %s\n",		guillemot->type->name, data[14], data[15], gameport->phys);	return 0;fail2:	gameport_close(gameport);fail1:  gameport_set_drvdata(gameport, NULL);	kfree(guillemot);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/17dd3f0f7aa729a042af5d3318ff9b3e7781b45b/guillemot.c/buggy/drivers/input/joystick/guillemot.c