ath9k_htc: Add a sanity check in ath9k_htc_ampdu_action()
[pandora-kernel.git] / drivers / hwmon / adm1029.c
index 0b8a3b1..3dbf405 100644 (file)
@@ -228,6 +228,9 @@ static ssize_t set_fan_div(struct device *dev,
        /* Update the value */
        reg = (reg & 0x3F) | (val << 6);
 
+       /* Update the cache */
+       data->fan_div[attr->index] = reg;
+
        /* Write value */
        i2c_smbus_write_byte_data(client,
                                  ADM1029_REG_FAN_DIV[attr->index], reg);