1
0
Fork 0

hwmon: (lm90) 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>
hifive-unleashed-5.1
Jean Delvare 2013-07-08 14:18:24 +02:00 committed by Jean Delvare
parent d2b4a64671
commit 78c2c2fe59
1 changed files with 2 additions and 2 deletions

View File

@ -470,8 +470,8 @@ static struct lm90_data *lm90_update_device(struct device *dev)
mutex_lock(&data->update_lock);
next_update = data->last_updated
+ msecs_to_jiffies(data->update_interval) + 1;
next_update = data->last_updated +
msecs_to_jiffies(data->update_interval);
if (time_after(jiffies, next_update) || !data->valid) {
u8 h, l;
u8 alarms;