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>
This commit is contained in:

committed by
Jean Delvare

parent
2373c1801a
commit
54fb4a05af
@@ -51,6 +51,7 @@
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/acpi.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -343,6 +344,11 @@ static int __devinit nforce2_probe_smb (struct pci_dev *dev, int bar,
|
||||
smbus->size = 64;
|
||||
}
|
||||
|
||||
error = acpi_check_region(smbus->base, smbus->size,
|
||||
nforce2_driver.name);
|
||||
if (error)
|
||||
return -1;
|
||||
|
||||
if (!request_region(smbus->base, smbus->size, nforce2_driver.name)) {
|
||||
dev_err(&smbus->adapter.dev, "Error requesting region %02x .. %02X for %s\n",
|
||||
smbus->base, smbus->base+smbus->size-1, name);
|
||||
|
Reference in New Issue
Block a user