s->io[0].Attributes = attr; 
static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base,			  ioaddr_t num, u_int lines){	int i;	kio_addr_t try, align;	align = (*base) ? (lines ? 1<<lines : 0) : 1;	if (align && (align < num)) {		if (*base) {			ds_dbg(s, 0, "odd IO request: num %#x align %#lx\n",			       num, align);			align = 0;		} else			while (align && (align < num)) align <<= 1;	}	if (*base & ~(align-1)) {		ds_dbg(s, 0, "odd IO request: base %#x align %#lx\n",		       *base, align);		align = 0;	}	if ((s->features & SS_CAP_STATIC_MAP) && s->io_offset) {		*base = s->io_offset | (*base & 0x0fff);		return 0;	}	/* Check for an already-allocated window that must conflict with	 * what was asked for.  It is a hack because it does not catch all	 * potential conflicts, just the most obvious ones.	 */	for (i = 0; i < MAX_IO_WIN; i++)		if ((s->io[i].NumPorts != 0) &&		    ((s->io[i].BasePort & (align-1)) == *base))			return 1;	for (i = 0; i < MAX_IO_WIN; i++) {		if (s->io[i].NumPorts == 0) {			s->io[i].res = pcmcia_find_io_region(*base, num, align, s);			if (s->io[i].res) {				s->io[i].Attributes = attr;				s->io[i].BasePort = *base = s->io[i].res->start;				s->io[i].NumPorts = s->io[i].InUse = num;				break;			} else				return 1;		} else if (s->io[i].Attributes != attr)			continue;		/* Try to extend top of window */		try = s->io[i].BasePort + s->io[i].NumPorts;		if ((*base == 0) || (*base == try))			if (pcmcia_adjust_io_region(s->io[i].res, s->io[i].res->start,						    s->io[i].res->end + num, s) == 0) {				*base = try;				s->io[i].NumPorts += num;				s->io[i].InUse += num;				break;			}		/* Try to extend bottom of window */		try = s->io[i].BasePort - num;		if ((*base == 0) || (*base == try))			if (pcmcia_adjust_io_region(s->io[i].res, s->io[i].res->start - num,						    s->io[i].res->end, s) == 0) {				s->io[i].BasePort = *base = try;				s->io[i].NumPorts += num;				s->io[i].InUse += num;				break;			}	}	return (i == MAX_IO_WIN);} /* alloc_io_space */
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/57b6281cea59639cce995745f1dc42fe9da2c533/pcmcia_resource.c/buggy/drivers/pcmcia/pcmcia_resource.c