aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/atxp1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/atxp1.c')
-rw-r--r--drivers/hwmon/atxp1.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/hwmon/atxp1.c b/drivers/hwmon/atxp1.c
index 0bcf82b4c07b..fca3fc1cef72 100644
--- a/drivers/hwmon/atxp1.c
+++ b/drivers/hwmon/atxp1.c
@@ -21,6 +21,7 @@
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/jiffies.h>
24#include <linux/i2c.h> 25#include <linux/i2c.h>
25#include <linux/i2c-sensor.h> 26#include <linux/i2c-sensor.h>
26#include <linux/i2c-vid.h> 27#include <linux/i2c-vid.h>
@@ -80,9 +81,7 @@ static struct atxp1_data * atxp1_update_device(struct device *dev)
80 81
81 down(&data->update_lock); 82 down(&data->update_lock);
82 83
83 if ((jiffies - data->last_updated > HZ) || 84 if (time_after(jiffies, data->last_updated + HZ) || !data->valid) {
84 (jiffies < data->last_updated) ||
85 !data->valid) {
86 85
87 /* Update local register data */ 86 /* Update local register data */
88 data->reg.vid = i2c_smbus_read_byte_data(client, ATXP1_VID); 87 data->reg.vid = i2c_smbus_read_byte_data(client, ATXP1_VID);