found: 
found: 
static int __devinit vt596_probe(struct pci_dev *pdev,				 const struct pci_device_id *id){	unsigned char temp;	int error = -ENODEV;		/* Determine the address of the SMBus areas */	if (force_addr) {		vt596_smba = force_addr & 0xfff0;		force = 0;		goto found;	}	if ((pci_read_config_word(pdev, id->driver_data, &vt596_smba)) ||	    !(vt596_smba & 0x1)) {		/* try 2nd address and config reg. for 596 */		if (id->device == PCI_DEVICE_ID_VIA_82C596_3 &&		    !pci_read_config_word(pdev, SMBBA2, &vt596_smba) &&		    (vt596_smba & 0x1)) {			smb_cf_hstcfg = 0x84;		} else {			/* no matches at all */			dev_err(&pdev->dev, "Cannot configure "				"SMBus I/O Base address\n");			return -ENODEV;		}	}	vt596_smba &= 0xfff0;	if (vt596_smba == 0) {		dev_err(&pdev->dev, "SMBus base address "			"uninitialized - upgrade BIOS or use "			"force_addr=0xaddr\n");		return -ENODEV;	} found:	if (!request_region(vt596_smba, 8, "viapro-smbus")) {		dev_err(&pdev->dev, "SMBus region 0x%x already in use!\n",		        vt596_smba);		return -ENODEV;	}	pci_read_config_byte(pdev, SMBHSTCFG, &temp);	/* If force_addr is set, we program the new address here. Just to make	   sure, we disable the VT596 first. */	if (force_addr) {		pci_write_config_byte(pdev, SMBHSTCFG, temp & 0xfe);		pci_write_config_word(pdev, id->driver_data, vt596_smba);		pci_write_config_byte(pdev, SMBHSTCFG, temp | 0x01);		dev_warn(&pdev->dev, "WARNING: SMBus interface set to new "		     "address 0x%04x!\n", vt596_smba);	} else if ((temp & 1) == 0) {		if (force) {			/* NOTE: This assumes I/O space and other allocations 			 * WERE done by the Bios!  Don't complain if your 			 * hardware does weird things after enabling this. 			 * :') Check for Bios updates before resorting to 			 * this.			 */			pci_write_config_byte(pdev, SMBHSTCFG, temp | 1);			dev_info(&pdev->dev, "Enabling SMBus device\n");		} else {			dev_err(&pdev->dev, "SMBUS: Error: Host SMBus "				"controller not enabled! - upgrade BIOS or "				"use force=1\n");			goto release_region;		}	}	if ((temp & 0x0E) == 8)		dev_dbg(&pdev->dev, "using Interrupt 9 for SMBus.\n");	else if ((temp & 0x0E) == 0)		dev_dbg(&pdev->dev, "using Interrupt SMI# for SMBus.\n");	else		dev_dbg(&pdev->dev, "Illegal Interrupt configuration "			"(or code out of date)!\n");	pci_read_config_byte(pdev, SMBREV, &temp);	dev_dbg(&pdev->dev, "SMBREV = 0x%X\n", temp);	dev_dbg(&pdev->dev, "VT596_smba = 0x%X\n", vt596_smba);	vt596_adapter.dev.parent = &pdev->dev;	snprintf(vt596_adapter.name, I2C_NAME_SIZE,			"SMBus Via Pro adapter at %04x", vt596_smba);		vt596_pdev = pci_dev_get(pdev);	if (i2c_add_adapter(&vt596_adapter)) {		pci_dev_put(vt596_pdev);		vt596_pdev = NULL;	}	/* Always return failure here.  This is to allow other drivers to bind	 * to this pci device.  We don't really want to have control over the	 * pci device, we only wanted to read as few register values from it.	 */	return -ENODEV; release_region:	release_region(vt596_smba, 8);	return error;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/5f49ef8e8cefe0a95948b4270db28507c1c287d4/i2c-viapro.c/buggy/drivers/i2c/busses/i2c-viapro.c