hp->index = ++hvc_count;
for (i=0; i < MAX_NR_HVC_CONSOLES; i++) if (vtermnos[i] == hp->vtermno) break;   if (i >= MAX_NR_HVC_CONSOLES) i = ++last_hvc;  hp->index = i;
static int __devinit hvc_probe(		struct vio_dev *dev,		const struct vio_device_id *id){	struct hvc_struct *hp;	/* probed with invalid parameters. */	if (!dev || !id)		return -EPERM;	hp = kmalloc(sizeof(*hp), GFP_KERNEL);	if (!hp)		return -ENOMEM;	memset(hp, 0x00, sizeof(*hp));	hp->vtermno = dev->unit_address;	hp->vdev = dev;	hp->vdev->dev.driver_data = hp;	hp->irq = dev->irq;	kobject_init(&hp->kobj);	hp->kobj.ktype = &hvc_kobj_type;	spin_lock_init(&hp->lock);	spin_lock(&hvc_structs_lock);	hp->index = ++hvc_count;	list_add_tail(&(hp->next), &hvc_structs);	spin_unlock(&hvc_structs_lock);	return 0;}