sunkbd->dev.name = sunkbd->name; sunkbd->dev.phys = sunkbd->phys; sunkbd->dev.id.bustype = BUS_RS232; sunkbd->dev.id.vendor = SERIO_SUNKBD; sunkbd->dev.id.product = sunkbd->type; sunkbd->dev.id.version = 0x0100; sunkbd->dev.dev = &serio->dev;  input_register_device(&sunkbd->dev);  printk(KERN_INFO "input: %s on %s\n", sunkbd->name, serio->phys);  return 0; 
fail:	serio_set_drvdata(serio, NULL); input_free_device(input_dev); kfree(sunkbd); return err; 
static int sunkbd_connect(struct serio *serio, struct serio_driver *drv){	struct sunkbd *sunkbd;	int i;	int err;	if (!(sunkbd = kmalloc(sizeof(struct sunkbd), GFP_KERNEL)))		return -ENOMEM;	memset(sunkbd, 0, sizeof(struct sunkbd));	init_input_dev(&sunkbd->dev);	init_waitqueue_head(&sunkbd->wait);	sunkbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_SND) | BIT(EV_REP);	sunkbd->dev.ledbit[0] = BIT(LED_CAPSL) | BIT(LED_COMPOSE) | BIT(LED_SCROLLL) | BIT(LED_NUML);	sunkbd->dev.sndbit[0] = BIT(SND_CLICK) | BIT(SND_BELL);	sunkbd->serio = serio;	INIT_WORK(&sunkbd->tq, sunkbd_reinit, sunkbd);	sunkbd->dev.keycode = sunkbd->keycode;	sunkbd->dev.keycodesize = sizeof(unsigned char);	sunkbd->dev.keycodemax = ARRAY_SIZE(sunkbd_keycode);	sunkbd->dev.event = sunkbd_event;	sunkbd->dev.private = sunkbd;	serio_set_drvdata(serio, sunkbd);	err = serio_open(serio, drv);	if (err) {		serio_set_drvdata(serio, NULL);		kfree(sunkbd);		return err;	}	if (sunkbd_initialize(sunkbd) < 0) {		serio_close(serio);		serio_set_drvdata(serio, NULL);		kfree(sunkbd);		return -ENODEV;	}	sprintf(sunkbd->name, "Sun Type %d keyboard", sunkbd->type);	memcpy(sunkbd->keycode, sunkbd_keycode, sizeof(sunkbd->keycode));	for (i = 0; i < 128; i++)		set_bit(sunkbd->keycode[i], sunkbd->dev.keybit);	clear_bit(0, sunkbd->dev.keybit);	sprintf(sunkbd->phys, "%s/input0", serio->phys);	sunkbd->dev.name = sunkbd->name;	sunkbd->dev.phys = sunkbd->phys;	sunkbd->dev.id.bustype = BUS_RS232;	sunkbd->dev.id.vendor = SERIO_SUNKBD;	sunkbd->dev.id.product = sunkbd->type;	sunkbd->dev.id.version = 0x0100;	sunkbd->dev.dev = &serio->dev;	input_register_device(&sunkbd->dev);	printk(KERN_INFO "input: %s on %s\n", sunkbd->name, serio->phys);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3c42f0c3dde8feb59fc87df45cadb847d5511c0a/sunkbd.c/clean/drivers/input/keyboard/sunkbd.c