diff options
author | Jean Delvare | 2008-07-14 22:38:33 +0200 |
---|---|---|
committer | Jean Delvare | 2008-07-14 22:38:33 +0200 |
commit | 54fb4a05af0a4b814e6716cfdf3fa97fc6be7a32 (patch) | |
tree | b3a258dce4f1bc8ccb58541efae444ba89f9fc55 /drivers/i2c/busses/i2c-sis5595.c | |
parent | i2c-ocores: basic PM support (diff) | |
download | kernel-qcow2-linux-54fb4a05af0a4b814e6716cfdf3fa97fc6be7a32.tar.gz kernel-qcow2-linux-54fb4a05af0a4b814e6716cfdf3fa97fc6be7a32.tar.xz kernel-qcow2-linux-54fb4a05af0a4b814e6716cfdf3fa97fc6be7a32.zip |
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-sis5595.c')
-rw-r--r-- | drivers/i2c/busses/i2c-sis5595.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c index f76944b384f5..3c8e0e1bd24f 100644 --- a/drivers/i2c/busses/i2c-sis5595.c +++ b/drivers/i2c/busses/i2c-sis5595.c @@ -62,6 +62,7 @@ #include <linux/ioport.h> #include <linux/init.h> #include <linux/i2c.h> +#include <linux/acpi.h> #include <asm/io.h> static int blacklist[] = { @@ -174,6 +175,11 @@ static int sis5595_setup(struct pci_dev *SIS5595_dev) /* NB: We grab just the two SMBus registers here, but this may still * interfere with ACPI :-( */ + retval = acpi_check_region(sis5595_base + SMB_INDEX, 2, + sis5595_driver.name); + if (retval) + return retval; + if (!request_region(sis5595_base + SMB_INDEX, 2, sis5595_driver.name)) { dev_err(&SIS5595_dev->dev, "SMBus registers 0x%04x-0x%04x already in use!\n", |