Skip to content

Commit

Permalink
hwmon: (lm90) Drop redundant safety on cache lifetime
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Jul 8, 2013
1 parent d2b4a64 commit 78c2c2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hwmon/lm90.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 78c2c2f

Please sign in to comment.