diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-10-13 16:56:28 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-10-18 13:03:09 -0700 |
commit | e693810ce8495ce3e227dacaa83f501b3b8ab204 (patch) | |
tree | bbedeb3dbfe1bda6b07b24b36aee94b93262b7b6 /drivers/hwmon | |
parent | 14992c7eff937bb12c8ebf2d91dbaa8c2f0cfc87 (diff) | |
download | kernel_samsung_aries-e693810ce8495ce3e227dacaa83f501b3b8ab204.zip kernel_samsung_aries-e693810ce8495ce3e227dacaa83f501b3b8ab204.tar.gz kernel_samsung_aries-e693810ce8495ce3e227dacaa83f501b3b8ab204.tar.bz2 |
hwmon: Let w83781d and lm78 load again
Let the w83781d and lm78 hardware monitoring drivers load even when
no chip was detected at the ISA address. There can still be supported
chips connected to an I2C bus or SMBus.
This fixes bug #7293.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/lm78.c | 12 | ||||
-rw-r--r-- | drivers/hwmon/w83781d.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c index ac1b746..73bc2ff 100644 --- a/drivers/hwmon/lm78.c +++ b/drivers/hwmon/lm78.c @@ -815,18 +815,18 @@ static int __init sm_lm78_init(void) if (res) return res; - res = i2c_isa_add_driver(&lm78_isa_driver); - if (res) { - i2c_del_driver(&lm78_driver); - return res; - } + /* Don't exit if this one fails, we still want the I2C variants + to work! */ + if (i2c_isa_add_driver(&lm78_isa_driver)) + isa_address = 0; return 0; } static void __exit sm_lm78_exit(void) { - i2c_isa_del_driver(&lm78_isa_driver); + if (isa_address) + i2c_isa_del_driver(&lm78_isa_driver); i2c_del_driver(&lm78_driver); } diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c index a4584ec..fea9206 100644 --- a/drivers/hwmon/w83781d.c +++ b/drivers/hwmon/w83781d.c @@ -1685,11 +1685,10 @@ sensors_w83781d_init(void) if (res) return res; - res = i2c_isa_add_driver(&w83781d_isa_driver); - if (res) { - i2c_del_driver(&w83781d_driver); - return res; - } + /* Don't exit if this one fails, we still want the I2C variants + to work! */ + if (i2c_isa_add_driver(&w83781d_isa_driver)) + isa_address = 0; return 0; } @@ -1697,7 +1696,8 @@ sensors_w83781d_init(void) static void __exit sensors_w83781d_exit(void) { - i2c_isa_del_driver(&w83781d_isa_driver); + if (isa_address) + i2c_isa_del_driver(&w83781d_isa_driver); i2c_del_driver(&w83781d_driver); } |