]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
hwmon: (lm90) Drop redundant safety on cache lifetime
authorJean Delvare <khali@linux-fr.org>
Mon, 8 Jul 2013 12:18:24 +0000 (14:18 +0200)
committerJean Delvare <khali@endymion.delvare>
Mon, 8 Jul 2013 12:18:24 +0000 (14:18 +0200)
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>
drivers/hwmon/lm90.c

index 8eeb141c85acdad04d23305cb581e76cef3d53fd..cdff74282955a9005fa2d8ea648866f21b59055c 100644 (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;