pci_disable_device(pci_dev); return -EIO; 
goto error; 
static int __devinit tpm_inf_probe(struct pci_dev *pci_dev,				   const struct pci_device_id *pci_id){	int rc = 0;	u8 iol, ioh;	int vendorid[2];	int version[2];	int productid[2];	char chipname[20];	if (pci_enable_device(pci_dev))		return -EIO;	dev_info(&pci_dev->dev, "LPC-bus found at 0x%x\n", pci_id->device);	/* read IO-ports from ACPI */	pnp_register_driver(&tpm_inf_pnp);	pnp_unregister_driver(&tpm_inf_pnp);	/* Make sure, we have received valid config ports */	if (!TPM_INF_ADDR) {		pci_disable_device(pci_dev);		return -EIO;	}	/* query chip for its vendor, its version number a.s.o. */	outb(ENABLE_REGISTER_PAIR, TPM_INF_ADDR);	outb(IDVENL, TPM_INF_ADDR);	vendorid[1] = inb(TPM_INF_DATA);	outb(IDVENH, TPM_INF_ADDR);	vendorid[0] = inb(TPM_INF_DATA);	outb(IDPDL, TPM_INF_ADDR);	productid[1] = inb(TPM_INF_DATA);	outb(IDPDH, TPM_INF_ADDR);	productid[0] = inb(TPM_INF_DATA);	outb(CHIP_ID1, TPM_INF_ADDR);	version[1] = inb(TPM_INF_DATA);	outb(CHIP_ID2, TPM_INF_ADDR);	version[0] = inb(TPM_INF_DATA);	switch ((productid[0] << 8) | productid[1]) {	case 6:		sprintf(chipname, " (SLD 9630 TT 1.1)");		break;	case 11:		sprintf(chipname, " (SLB 9635 TT 1.2)");		break;	default:		sprintf(chipname, " (unknown chip)");		break;	}	chipname[19] = 0;	if ((vendorid[0] << 8 | vendorid[1]) == (TPM_INFINEON_DEV_VEN_VALUE)) {		if (tpm_inf.base == 0) {			dev_err(&pci_dev->dev, "No IO-ports found!\n");			pci_disable_device(pci_dev);			return -EIO;		}		/* configure TPM with IO-ports */		outb(IOLIMH, TPM_INF_ADDR);		outb(((tpm_inf.base >> 8) & 0xff), TPM_INF_DATA);		outb(IOLIML, TPM_INF_ADDR);		outb((tpm_inf.base & 0xff), TPM_INF_DATA);		/* control if IO-ports are set correctly */		outb(IOLIMH, TPM_INF_ADDR);		ioh = inb(TPM_INF_DATA);		outb(IOLIML, TPM_INF_ADDR);		iol = inb(TPM_INF_DATA);		if ((ioh << 8 | iol) != tpm_inf.base) {			dev_err(&pci_dev->dev,				"Could not set IO-ports to %04x\n",				tpm_inf.base);			pci_disable_device(pci_dev);			return -EIO;		}		/* activate register */		outb(TPM_DAR, TPM_INF_ADDR);		outb(0x01, TPM_INF_DATA);		outb(DISABLE_REGISTER_PAIR, TPM_INF_ADDR);		/* disable RESET, LP and IRQC */		outb(RESET_LP_IRQC_DISABLE, tpm_inf.base + CMD);		/* Finally, we're done, print some infos */		dev_info(&pci_dev->dev, "TPM found: "			 "config base 0x%x, "			 "io base 0x%x, "			 "chip version %02x%02x, "			 "vendor id %x%x (Infineon), "			 "product id %02x%02x"			 "%s\n",			 TPM_INF_ADDR,			 tpm_inf.base,			 version[0], version[1],			 vendorid[0], vendorid[1],			 productid[0], productid[1], chipname);		rc = tpm_register_hardware(pci_dev, &tpm_inf);		if (rc < 0) {			pci_disable_device(pci_dev);			return -ENODEV;		}		return 0;	} else {		dev_info(&pci_dev->dev, "No Infineon TPM found!\n");		pci_disable_device(pci_dev);		return -ENODEV;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/e8a650150b1001bc34d506e4c44538463d368890/tpm_infineon.c/clean/drivers/char/tpm/tpm_infineon.c