aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-amd8111.c
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2008-07-14 16:38:33 -0400
committerJean Delvare <khali@mahadeva.delvare>2008-07-14 16:38:33 -0400
commit54fb4a05af0a4b814e6716cfdf3fa97fc6be7a32 (patch)
treeb3a258dce4f1bc8ccb58541efae444ba89f9fc55 /drivers/i2c/busses/i2c-amd8111.c
parent2373c1801afd06d3a206376902b39a98458c9cfb (diff)
i2c: Check for ACPI resource conflicts
Check for ACPI resource conflicts in i2c bus drivers. I've included all recent SMBus master drivers for PC hardware. I've voluntarily left out: * Drivers that don't run on PCs: they can't conflict with ACPI. * Bit-banged bus device drivers: it's very unlikely that ACPI would deal with such buses. Signed-off-by: Jean Delvare <jdelvare@suse.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-amd8111.c')
-rw-r--r--drivers/i2c/busses/i2c-amd8111.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c
index 0e18fe846010..3972208876b3 100644
--- a/drivers/i2c/busses/i2c-amd8111.c
+++ b/drivers/i2c/busses/i2c-amd8111.c
@@ -16,6 +16,7 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/i2c.h> 17#include <linux/i2c.h>
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/acpi.h>
19#include <asm/io.h> 20#include <asm/io.h>
20 21
21MODULE_LICENSE("GPL"); 22MODULE_LICENSE("GPL");
@@ -374,6 +375,10 @@ static int __devinit amd8111_probe(struct pci_dev *dev,
374 smbus->base = pci_resource_start(dev, 0); 375 smbus->base = pci_resource_start(dev, 0);
375 smbus->size = pci_resource_len(dev, 0); 376 smbus->size = pci_resource_len(dev, 0);
376 377
378 error = acpi_check_resource_conflict(&dev->resource[0]);
379 if (error)
380 goto out_kfree;
381
377 if (!request_region(smbus->base, smbus->size, amd8111_driver.name)) { 382 if (!request_region(smbus->base, smbus->size, amd8111_driver.name)) {
378 error = -EBUSY; 383 error = -EBUSY;
379 goto out_kfree; 384 goto out_kfree;