aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-ali15x3.c
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2008-07-14 22:38:33 +0200
committerJean Delvare <khali@mahadeva.delvare>2008-07-14 22:38:33 +0200
commit54fb4a05af0a4b814e6716cfdf3fa97fc6be7a32 (patch)
treeb3a258dce4f1bc8ccb58541efae444ba89f9fc55 /drivers/i2c/busses/i2c-ali15x3.c
parent2373c1801afd06d3a206376902b39a98458c9cfb (diff)
downloadkernel_samsung_smdk4412-54fb4a05af0a4b814e6716cfdf3fa97fc6be7a32.zip
kernel_samsung_smdk4412-54fb4a05af0a4b814e6716cfdf3fa97fc6be7a32.tar.gz
kernel_samsung_smdk4412-54fb4a05af0a4b814e6716cfdf3fa97fc6be7a32.tar.bz2
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-ali15x3.c')
-rw-r--r--drivers/i2c/busses/i2c-ali15x3.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c
index e922c39..a030abd 100644
--- a/drivers/i2c/busses/i2c-ali15x3.c
+++ b/drivers/i2c/busses/i2c-ali15x3.c
@@ -68,6 +68,7 @@
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/init.h>
+#include <linux/acpi.h>
#include <asm/io.h>
/* ALI15X3 SMBus address offsets */
@@ -166,6 +167,10 @@ static int ali15x3_setup(struct pci_dev *ALI15X3_dev)
if(force_addr)
ali15x3_smba = force_addr & ~(ALI15X3_SMB_IOSIZE - 1);
+ if (acpi_check_region(ali15x3_smba, ALI15X3_SMB_IOSIZE,
+ ali15x3_driver.name))
+ return -EBUSY;
+
if (!request_region(ali15x3_smba, ALI15X3_SMB_IOSIZE,
ali15x3_driver.name)) {
dev_err(&ALI15X3_dev->dev,