Commit 4e2284d2 authored by Jean Delvare's avatar Jean Delvare Committed by Guenter Roeck

hwmon: (tmp401) 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: default avatarJean Delvare <khali@linux-fr.org>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent ecacb0b1
...@@ -240,7 +240,7 @@ static struct tmp401_data *tmp401_update_device(struct device *dev) ...@@ -240,7 +240,7 @@ static struct tmp401_data *tmp401_update_device(struct device *dev)
mutex_lock(&data->update_lock); mutex_lock(&data->update_lock);
next_update = data->last_updated + next_update = data->last_updated +
msecs_to_jiffies(data->update_interval) + 1; msecs_to_jiffies(data->update_interval);
if (time_after(jiffies, next_update) || !data->valid) { if (time_after(jiffies, next_update) || !data->valid) {
if (data->kind != tmp432) { if (data->kind != tmp432) {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment