aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-nforce2.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-nforce2.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-nforce2.c')
-rw-r--r--drivers/i2c/busses/i2c-nforce2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
index 2654f20d3a62..3b19bc41a60b 100644
--- a/drivers/i2c/busses/i2c-nforce2.c
+++ b/drivers/i2c/busses/i2c-nforce2.c
@@ -51,6 +51,7 @@
51#include <linux/i2c.h> 51#include <linux/i2c.h>
52#include <linux/delay.h> 52#include <linux/delay.h>
53#include <linux/dmi.h> 53#include <linux/dmi.h>
54#include <linux/acpi.h>
54#include <asm/io.h> 55#include <asm/io.h>
55 56
56MODULE_LICENSE("GPL"); 57MODULE_LICENSE("GPL");
@@ -343,6 +344,11 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int bar,
343 smbus->size = 64; 344 smbus->size = 64;
344 } 345 }
345 346
347 error = acpi_check_region(smbus->base, smbus->size,
348 nforce2_driver.name);
349 if (error)
350 return -1;
351
346 if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) { 352 if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) {
347 dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n", 353 dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n",
348 smbus->base, smbus->base+smbus->size-1, name); 354 smbus->base, smbus->base+smbus->size-1, name);