From: Guenter Roeck Date: Fri, 13 Feb 2015 04:17:41 +0000 (-0800) Subject: Revert "Restore hardware monitoring logical device status on resume" X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c4e40c4f7602f70286948e7376ee4db975095672;p=groeck-nct6775 Revert "Restore hardware monitoring logical device status on resume" This reverts commit 8ec9699a1bc4e90f4642efcb68127800ced79591. --- diff --git a/nct6775.c b/nct6775.c index 0e81050..3272356 100644 --- 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++) {