mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
14992c7eff
commit
e693810ce8
3 changed files with 13 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue