From 7a9eb387528214bb145896a2feae520a5d417bda Mon Sep 17 00:00:00 2001 From: Philip Edelbrock Date: Sun, 28 Feb 1999 21:11:14 +0000 Subject: [PATCH] (Phil) Made sure probing won't happen on the ISA bus for these SMBus/I2C device drivers. Specifically, I added these lines: (in includes list) #include "i2c-isa.h" (Near beginning of *-attach-adapter function) /* Make sure we aren't probing the ISA bus!! */ if (i2c_is_isa_adapter(adapter)) return 0; This may be redundant is a couple of the files, but it shouldn't hurt. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@283 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/adm9240.c | 3 +++ kernel/chips/eeprom.c | 5 ++++- kernel/chips/lm75.c | 3 +++ kernel/chips/lm80.c | 4 ++++ kernel/chips/ltc1710.c | 3 +++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/kernel/chips/adm9240.c b/kernel/chips/adm9240.c index 26c41bac..ef0e53ac 100644 --- a/kernel/chips/adm9240.c +++ b/kernel/chips/adm9240.c @@ -311,6 +311,9 @@ int adm9240_attach_adapter(struct i2c_adapter *adapter) const char *type_name,*client_name; err = 0; + /* Make sure we aren't probing the ISA bus!! */ + if (i2c_is_isa_adapter(adapter)) return 0; + /* The address of the ADM2940 must at least start somewhere in 0x2C to 0x2F, but can be changed to be anyelse after that. (But, why??) */ diff --git a/kernel/chips/eeprom.c b/kernel/chips/eeprom.c index 51c6f359..bb281edd 100644 --- a/kernel/chips/eeprom.c +++ b/kernel/chips/eeprom.c @@ -24,6 +24,7 @@ #include "smbus.h" #include "sensors.h" #include "i2c.h" +#include "i2c-isa.h" #include "version.h" /* Many constants specified below */ @@ -130,7 +131,9 @@ int eeprom_attach_adapter(struct i2c_adapter *adapter) struct eeprom_data *data; err = 0; - + /* Make sure we aren't probing the ISA bus!! */ + if (i2c_is_isa_adapter(adapter)) return 0; + /* OK, this is no detection. I know. It will do for now, though. */ /* Set err only if a global error would make registering other clients diff --git a/kernel/chips/lm75.c b/kernel/chips/lm75.c index ce72b089..6ecd413d 100644 --- a/kernel/chips/lm75.c +++ b/kernel/chips/lm75.c @@ -23,6 +23,7 @@ #include "smbus.h" #include "sensors.h" #include "i2c.h" +#include "i2c-isa.h" #include "version.h" /* Many LM75 constants specified below */ @@ -113,6 +114,8 @@ int lm75_attach_adapter(struct i2c_adapter *adapter) struct lm75_data *data; err = 0; + /* Make sure we aren't probing the ISA bus!! */ + if (i2c_is_isa_adapter(adapter)) return 0; /* OK, this is no detection. I know. It will do for now, though. */ diff --git a/kernel/chips/lm80.c b/kernel/chips/lm80.c index 5385bf92..c493acf8 100644 --- a/kernel/chips/lm80.c +++ b/kernel/chips/lm80.c @@ -257,6 +257,10 @@ int lm80_attach_adapter(struct i2c_adapter *adapter) /* OK, this is no detection. I know. It will do for now, though. */ err = 0; + + /* Make sure we aren't probing the ISA bus!! */ + if (i2c_is_isa_adapter(adapter)) return 0; + for (address = 0x20; (! err) && (address <= 0x2f); address ++) { /* Later on, we will keep a list of registered addresses for each diff --git a/kernel/chips/ltc1710.c b/kernel/chips/ltc1710.c index 8991206a..0161cd82 100644 --- a/kernel/chips/ltc1710.c +++ b/kernel/chips/ltc1710.c @@ -46,6 +46,7 @@ #include "smbus.h" #include "sensors.h" #include "i2c.h" +#include "i2c-isa.h" #include "version.h" @@ -129,6 +130,8 @@ int ltc1710_attach_adapter(struct i2c_adapter *adapter) struct ltc1710_data *data; err = 0; + /* Make sure we aren't probing the ISA bus!! */ + if (i2c_is_isa_adapter(adapter)) return 0; /* OK, this is no detection. I know. It will do for now, though. */