]> git.sur5r.net Git - groeck-nct6775/commitdiff
Revert "Restore hardware monitoring logical device status on resume"
authorGuenter Roeck <linux@roeck-us.net>
Fri, 13 Feb 2015 04:17:41 +0000 (20:17 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 13 Feb 2015 04:17:41 +0000 (20:17 -0800)
This reverts commit 8ec9699a1bc4e90f4642efcb68127800ced79591.

nct6775.c

index 0e8105087f537d9a76864cad5547125e663e9ef0..3272356015af5478fda2d31588cb2056c05156cf 100644 (file)
--- a/nct6775.c
+++ b/nct6775.c
@@ -890,7 +890,6 @@ struct nct6775_data {
        u8 vbat;
        u8 fandiv1;
        u8 fandiv2;
-       u8 sio_enable;
 #endif
 };
 
@@ -3219,8 +3218,6 @@ nct6775_check_fan_inputs(struct nct6775_data *data)
                superio_select(sioreg, NCT6775_LD_HWM);
                regval = superio_inb(sioreg, SIO_REG_ENABLE);
 
-               data->sio_enable = regval;
-
                if (regval & 0x80)
                        fan3pin = gpok;
                else
@@ -4053,26 +4050,19 @@ static int nct6775_suspend(struct device *dev)
 static int nct6775_resume(struct device *dev)
 {
        struct nct6775_data *data = dev_get_drvdata(dev);
-       int sioreg = data->sioreg;
        int i, j, err = 0;
-       u8 reg;
 
        mutex_lock(&data->update_lock);
        data->bank = 0xff;              /* Force initial bank selection */
 
-       err = superio_enter(sioreg);
-       if (err)
-               goto abort;
-
-       superio_select(sioreg, NCT6775_LD_HWM);
-       reg = superio_inb(sioreg, SIO_REG_ENABLE);
-       if (reg != data->sio_enable)
-               superio_outb(sioreg, SIO_REG_ENABLE, data->sio_enable);
-
-       if (data->kind == nct6791 || data->kind == nct6792)
-               nct6791_enable_io_mapping(sioreg);
+       if (data->kind == nct6791 || data->kind == nct6792) {
+               err = superio_enter(data->sioreg);
+               if (err)
+                       goto abort;
 
-       superio_exit(sioreg);
+               nct6791_enable_io_mapping(data->sioreg);
+               superio_exit(data->sioreg);
+       }
 
        /* Restore limits */
        for (i = 0; i < data->in_num; i++) {