memset(atkbd, 0, sizeof(struct atkbd));  
atkbd->dev = dev; 
static int atkbd_connect(struct serio *serio, struct serio_driver *drv){	struct atkbd *atkbd;	int err;	if (!(atkbd = kmalloc(sizeof(struct atkbd), GFP_KERNEL)))		return - ENOMEM;	memset(atkbd, 0, sizeof(struct atkbd));	ps2_init(&atkbd->ps2dev, serio);	switch (serio->id.type) {		case SERIO_8042_XL:			atkbd->translated = 1;		case SERIO_8042:			if (serio->write)				atkbd->write = 1;			break;	}	atkbd->softraw = atkbd_softraw;	atkbd->softrepeat = atkbd_softrepeat;	atkbd->scroll = atkbd_scroll;	if (!atkbd->write)		atkbd->softrepeat = 1;	if (atkbd->softrepeat)		atkbd->softraw = 1;	serio_set_drvdata(serio, atkbd);	err = serio_open(serio, drv);	if (err) {		serio_set_drvdata(serio, NULL);		kfree(atkbd);		return err;	}	if (atkbd->write) {		if (atkbd_probe(atkbd)) {			serio_close(serio);			serio_set_drvdata(serio, NULL);			kfree(atkbd);			return -ENODEV;		}		atkbd->set = atkbd_select_set(atkbd, atkbd_set, atkbd_extra);		atkbd_activate(atkbd);	} else {		atkbd->set = 2;		atkbd->id = 0xab00;	}	if (atkbd->extra)		sprintf(atkbd->name, "AT Set 2 Extra keyboard");	else		sprintf(atkbd->name, "AT %s Set %d keyboard",			atkbd->translated ? "Translated" : "Raw", atkbd->set);	sprintf(atkbd->phys, "%s/input0", serio->phys);	atkbd_set_keycode_table(atkbd);	atkbd_set_device_attrs(atkbd);	input_register_device(&atkbd->dev);	device_create_file(&serio->dev, &atkbd_attr_extra);	device_create_file(&serio->dev, &atkbd_attr_scroll);	device_create_file(&serio->dev, &atkbd_attr_set);	device_create_file(&serio->dev, &atkbd_attr_softrepeat);	device_create_file(&serio->dev, &atkbd_attr_softraw);	atkbd_enable(atkbd);	printk(KERN_INFO "input: %s on %s\n", atkbd->name, serio->phys);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3c42f0c3dde8feb59fc87df45cadb847d5511c0a/atkbd.c/clean/drivers/input/keyboard/atkbd.c