aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2013-07-08 08:18:24 -0400
committerJean Delvare <khali@endymion.delvare>2013-07-08 08:18:24 -0400
commit5b0620df9c38438ee245a97b8102ed74556e5505 (patch)
tree0a54591c5999ed7522fb4c253aa927ce885f9dce /drivers/hwmon
parent78c2c2fe59b8c6b7d20e163efde0bfccc679f647 (diff)
hwmon: (lm63) Drop redundant safety on cache lifetime
time_after (as opposed to time_after_equal) already ensures that the cache lifetime is at least as much as requested. There is no point in manually adding another jiffy to that value, and this can confuse the reader into wrong interpretation. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Imre Deak <imre.deak@intel.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/lm63.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c
index f644a2e57599..d0def50ea860 100644
--- a/drivers/hwmon/lm63.c
+++ b/drivers/hwmon/lm63.c
@@ -247,9 +247,8 @@ static struct lm63_data *lm63_update_device(struct device *dev)
247 247
248 mutex_lock(&data->update_lock); 248 mutex_lock(&data->update_lock);
249 249
250 next_update = data->last_updated 250 next_update = data->last_updated +
251 + msecs_to_jiffies(data->update_interval) + 1; 251 msecs_to_jiffies(data->update_interval);
252
253 if (time_after(jiffies, next_update) || !data->valid) { 252 if (time_after(jiffies, next_update) || !data->valid) {
254 if (data->config & 0x04) { /* tachometer enabled */ 253 if (data->config & 0x04) { /* tachometer enabled */
255 /* order matters for fan1_input */ 254 /* order matters for fan1_input */