address[i] = val; 
addresses[i] = val; 
static int pc87360_find(int sioaddr, u8 *devid, int *address){	u16 val;	int i;	int nrdev; /* logical device count */	/* No superio_enter */	/* Identify device */	val = superio_inb(sioaddr, DEVID);	switch (val) {	case 0xE1: /* PC87360 */	case 0xE8: /* PC87363 */	case 0xE4: /* PC87364 */		nrdev = 1;		break;	case 0xE5: /* PC87365 */	case 0xE9: /* PC87366 */		nrdev = 3;		break;	default:		superio_exit(sioaddr);		return -ENODEV;	}	/* Remember the device id */	*devid = val;	for (i = 0; i < nrdev; i++) {		/* select logical device */		superio_outb(sioaddr, DEV, logdev[i]);		val = superio_inb(sioaddr, ACT);		if (!(val & 0x01)) {			printk(KERN_INFO "pc87360: Device 0x%02x not "			       "activated\n", logdev[i]);			continue;		}		val = (superio_inb(sioaddr, BASE) << 8)		    | superio_inb(sioaddr, BASE + 1);		if (!val) {			printk(KERN_INFO "pc87360: Base address not set for "			       "device 0x%02x\n", logdev[i]);			continue;		}		address[i] = val;		if (i==0) { /* Fans */			confreg[0] = superio_inb(sioaddr, 0xF0);			confreg[1] = superio_inb(sioaddr, 0xF1);#ifdef DEBUG			printk(KERN_DEBUG "pc87360: Fan 1: mon=%d "			       "ctrl=%d inv=%d\n", (confreg[0]>>2)&1,			       (confreg[0]>>3)&1, (confreg[0]>>4)&1);			printk(KERN_DEBUG "pc87360: Fan 2: mon=%d "			       "ctrl=%d inv=%d\n", (confreg[0]>>5)&1,			       (confreg[0]>>6)&1, (confreg[0]>>7)&1);			printk(KERN_DEBUG "pc87360: Fan 3: mon=%d "			       "ctrl=%d inv=%d\n", confreg[1]&1,			       (confreg[1]>>1)&1, (confreg[1]>>2)&1);#endif		} else if (i==1) { /* Voltages */			/* Are we using thermistors? */			if (*devid == 0xE9) { /* PC87366 */				/* These registers are not logical-device				   specific, just that we won't need them if				   we don't use the VLM device */				confreg[2] = superio_inb(sioaddr, 0x2B);				confreg[3] = superio_inb(sioaddr, 0x25);				if (confreg[2] & 0x40) {					printk(KERN_INFO "pc87360: Using "					       "thermistors for temperature "					       "monitoring\n");				}				if (confreg[3] & 0xE0) {					printk(KERN_INFO "pc87360: VID "					       "inputs routed (mode %u)\n",					       confreg[3] >> 5);				}			}		}	}	superio_exit(sioaddr);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/2d8672c5a6ba0d3f1d8d3ad61ef67868941364f0/pc87360.c/buggy/drivers/hwmon/pc87360.c