diff options
author | Jean Delvare <jdelvare@suse.de> | 2008-07-15 00:38:33 +0400 |
---|---|---|
committer | Jean Delvare <khali@mahadeva.delvare> | 2008-07-15 00:38:33 +0400 |
commit | 54fb4a05af0a4b814e6716cfdf3fa97fc6be7a32 (patch) | |
tree | b3a258dce4f1bc8ccb58541efae444ba89f9fc55 /drivers/i2c/busses/i2c-amd8111.c | |
parent | 2373c1801afd06d3a206376902b39a98458c9cfb (diff) | |
download | linux-54fb4a05af0a4b814e6716cfdf3fa97fc6be7a32.tar.xz |
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.c | 5 |
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 @@ #include <linux/init.h> #include <linux/i2c.h> #include <linux/delay.h> +#include <linux/acpi.h> #include <asm/io.h> MODULE_LICENSE("GPL"); @@ -374,6 +375,10 @@ static int __devinit amd8111_probe(struct pci_dev *dev, smbus->base = pci_resource_start(dev, 0); smbus->size = pci_resource_len(dev, 0); + error = acpi_check_resource_conflict(&dev->resource[0]); + if (error) + goto out_kfree; + if (!request_region(smbus->base, smbus->size, amd8111_driver.name)) { error = -EBUSY; goto out_kfree; |