list_add_tail(&ps2port->node, &ps2port_list);  
static int __init gscps2_probe(struct parisc_device *dev){	struct gscps2port *ps2port;	struct serio *serio;	unsigned long hpa = dev->hpa.start;	int ret;	if (!dev->irq)		return -ENODEV;	/* Offset for DINO PS/2. Works with LASI even */	if (dev->id.sversion == 0x96)		hpa += GSC_DINO_OFFSET;	ps2port = kmalloc(sizeof(struct gscps2port), GFP_KERNEL);	serio = kmalloc(sizeof(struct serio), GFP_KERNEL);	if (!ps2port || !serio) {		ret = -ENOMEM;		goto fail_nomem;	}	dev_set_drvdata(&dev->dev, ps2port);	memset(ps2port, 0, sizeof(struct gscps2port));	memset(serio, 0, sizeof(struct serio));	ps2port->port = serio;	ps2port->padev = dev;	ps2port->addr = ioremap(hpa, GSC_STATUS + 4);	spin_lock_init(&ps2port->lock);	gscps2_reset(ps2port);	ps2port->id = readb(ps2port->addr + GSC_ID) & 0x0f;	snprintf(serio->name, sizeof(serio->name), "GSC PS/2 %s",		 (ps2port->id == GSC_ID_KEYBOARD) ? "keyboard" : "mouse");	strlcpy(serio->phys, dev->dev.bus_id, sizeof(serio->phys));	serio->id.type		= SERIO_8042;	serio->write		= gscps2_write;	serio->open		= gscps2_open;	serio->close		= gscps2_close;	serio->port_data	= ps2port;	serio->dev.parent	= &dev->dev;	list_add_tail(&ps2port->node, &ps2port_list);	ret = -EBUSY;	if (request_irq(dev->irq, gscps2_interrupt, SA_SHIRQ, ps2port->port->name, ps2port))		goto fail_miserably;	if (ps2port->id != GSC_ID_KEYBOARD && ps2port->id != GSC_ID_MOUSE) {		printk(KERN_WARNING PFX "Unsupported PS/2 port at 0x%08lx (id=%d) ignored\n",				hpa, ps2port->id);		ret = -ENODEV;		goto fail;	}#if 0	if (!request_mem_region(hpa, GSC_STATUS + 4, ps2port->port.name))		goto fail;#endif	printk(KERN_INFO "serio: %s port at 0x%p irq %d @ %s\n",		ps2port->port->name,		ps2port->addr,		ps2port->padev->irq,		ps2port->port->phys);	serio_register_port(ps2port->port);	return 0;fail:	free_irq(dev->irq, ps2port);fail_miserably:	list_del(&ps2port->node);	iounmap(ps2port->addr);	release_mem_region(dev->hpa, GSC_STATUS + 4);fail_nomem:	kfree(ps2port);	kfree(serio);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/6ab0f5cd364476fe5cb329fd46ee41bea6d4c69c/gscps2.c/buggy/drivers/input/serio/gscps2.c