]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/lm78.c
[S390] sclp: invalid handling of temporary 'not operational' status
[linux-2.6-omap-h63xx.git] / drivers / hwmon / lm78.c
index ac1b746df6d0ad765b97bcb2fd77cb5bb99dabcb..73bc2ffc598d2cabf66664f34b43b9f9dbb2d9ce 100644 (file)
@@ -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);
 }