Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30897
b: refs/heads/master
c: d6fcb3b
h: refs/heads/master
i:
  30895: a40fa54
v: v3
  • Loading branch information
Daniel Ritz authored and Linus Torvalds committed Jun 28, 2006
1 parent 15fe686 commit 9261aa1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f17a2686b11453680e9662ef8bdc8d948d0dce18
refs/heads/master: d6fcb3b9cf776e3f748709cd3091a72cb3855c29
16 changes: 10 additions & 6 deletions trunk/drivers/i2c/busses/i2c-i801.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,15 +488,15 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id
dev_err(&dev->dev, "SMBus base address uninitialized, "
"upgrade BIOS\n");
err = -ENODEV;
goto exit_disable;
goto exit;
}

err = pci_request_region(dev, SMBBAR, i801_driver.name);
if (err) {
dev_err(&dev->dev, "Failed to request SMBus region "
"0x%lx-0x%lx\n", i801_smba,
pci_resource_end(dev, SMBBAR));
goto exit_disable;
goto exit;
}

pci_read_config_byte(I801_dev, SMBHSTCFG, &temp);
Expand All @@ -520,11 +520,12 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id
err = i2c_add_adapter(&i801_adapter);
if (err) {
dev_err(&dev->dev, "Failed to add SMBus adapter\n");
goto exit_disable;
goto exit_release;
}
return 0;

exit_disable:
pci_disable_device(dev);
exit_release:
pci_release_region(dev, SMBBAR);
exit:
return err;
}
Expand All @@ -533,7 +534,10 @@ static void __devexit i801_remove(struct pci_dev *dev)
{
i2c_del_adapter(&i801_adapter);
pci_release_region(dev, SMBBAR);
pci_disable_device(dev);
/*
* do not call pci_disable_device(dev) since it can cause hard hangs on
* some systems during power-off (eg. Fujitsu-Siemens Lifebook E8010)
*/
}

static struct pci_driver i801_driver = {
Expand Down

0 comments on commit 9261aa1

Please sign in to comment.