提交 78c2c2fe 编写于 作者: J Jean Delvare 提交者: Jean Delvare

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: NJean Delvare <khali@linux-fr.org>
Cc: Imre Deak <imre.deak@intel.com>
上级 d2b4a646
...@@ -470,8 +470,8 @@ static struct lm90_data *lm90_update_device(struct device *dev) ...@@ -470,8 +470,8 @@ static struct lm90_data *lm90_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) {
u8 h, l; u8 h, l;
u8 alarms; u8 alarms;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册