diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-10-13 10:56:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-10-18 16:03:09 -0400 |
commit | e693810ce8495ce3e227dacaa83f501b3b8ab204 (patch) | |
tree | bbedeb3dbfe1bda6b07b24b36aee94b93262b7b6 /drivers | |
parent | 14992c7eff937bb12c8ebf2d91dbaa8c2f0cfc87 (diff) |
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')
-rw-r--r-- | drivers/hwmon/lm78.c | 12 | ||||
-rw-r--r-- | drivers/hwmon/w83781d.c | 12 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-isa.c | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c index ac1b746df6d0..73bc2ffc598d 100644 --- a/drivers/hwmon/lm78.c +++ b/drivers/hwmon/lm78.c | |||
@@ -815,18 +815,18 @@ static int __init sm_lm78_init(void) | |||
815 | if (res) | 815 | if (res) |
816 | return res; | 816 | return res; |
817 | 817 | ||
818 | res = i2c_isa_add_driver(&lm78_isa_driver); | 818 | /* Don't exit if this one fails, we still want the I2C variants |
819 | if (res) { | 819 | to work! */ |
820 | i2c_del_driver(&lm78_driver); | 820 | if (i2c_isa_add_driver(&lm78_isa_driver)) |
821 | return res; | 821 | isa_address = 0; |
822 | } | ||
823 | 822 | ||
824 | return 0; | 823 | return 0; |
825 | } | 824 | } |
826 | 825 | ||
827 | static void __exit sm_lm78_exit(void) | 826 | static void __exit sm_lm78_exit(void) |
828 | { | 827 | { |
829 | i2c_isa_del_driver(&lm78_isa_driver); | 828 | if (isa_address) |
829 | i2c_isa_del_driver(&lm78_isa_driver); | ||
830 | i2c_del_driver(&lm78_driver); | 830 | i2c_del_driver(&lm78_driver); |
831 | } | 831 | } |
832 | 832 | ||
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c index a4584ec69842..fea92061f863 100644 --- a/drivers/hwmon/w83781d.c +++ b/drivers/hwmon/w83781d.c | |||
@@ -1685,11 +1685,10 @@ sensors_w83781d_init(void) | |||
1685 | if (res) | 1685 | if (res) |
1686 | return res; | 1686 | return res; |
1687 | 1687 | ||
1688 | res = i2c_isa_add_driver(&w83781d_isa_driver); | 1688 | /* Don't exit if this one fails, we still want the I2C variants |
1689 | if (res) { | 1689 | to work! */ |
1690 | i2c_del_driver(&w83781d_driver); | 1690 | if (i2c_isa_add_driver(&w83781d_isa_driver)) |
1691 | return res; | 1691 | isa_address = 0; |
1692 | } | ||
1693 | 1692 | ||
1694 | return 0; | 1693 | return 0; |
1695 | } | 1694 | } |
@@ -1697,7 +1696,8 @@ sensors_w83781d_init(void) | |||
1697 | static void __exit | 1696 | static void __exit |
1698 | sensors_w83781d_exit(void) | 1697 | sensors_w83781d_exit(void) |
1699 | { | 1698 | { |
1700 | i2c_isa_del_driver(&w83781d_isa_driver); | 1699 | if (isa_address) |
1700 | i2c_isa_del_driver(&w83781d_isa_driver); | ||
1701 | i2c_del_driver(&w83781d_driver); | 1701 | i2c_del_driver(&w83781d_driver); |
1702 | } | 1702 | } |
1703 | 1703 | ||
diff --git a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c index 4380653748a4..8ed59a2dff53 100644 --- a/drivers/i2c/busses/i2c-isa.c +++ b/drivers/i2c/busses/i2c-isa.c | |||
@@ -91,7 +91,7 @@ int i2c_isa_add_driver(struct i2c_driver *driver) | |||
91 | /* Now look for clients */ | 91 | /* Now look for clients */ |
92 | res = driver->attach_adapter(&isa_adapter); | 92 | res = driver->attach_adapter(&isa_adapter); |
93 | if (res) { | 93 | if (res) { |
94 | dev_err(&isa_adapter.dev, | 94 | dev_dbg(&isa_adapter.dev, |
95 | "Driver %s failed to attach adapter, unregistering\n", | 95 | "Driver %s failed to attach adapter, unregistering\n", |
96 | driver->driver.name); | 96 | driver->driver.name); |
97 | driver_unregister(&driver->driver); | 97 | driver_unregister(&driver->driver); |