aboutsummaryrefslogtreecommitdiff
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 0bcf82b4c07..fca3fc1cef7 100644
--- a/drivers/hwmon/atxp1.c
+++ b/drivers/hwmon/atxp1.c
@@ -21,6 +21,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
+#include <linux/jiffies.h>
#include <linux/i2c.h>
#include <linux/i2c-sensor.h>
#include <linux/i2c-vid.h>
@@ -80,9 +81,7 @@ static struct atxp1_data * atxp1_update_device(struct device *dev)
down(&data->update_lock);
- if ((jiffies - data->last_updated > HZ) ||
- (jiffies < data->last_updated) ||
- !data->valid) {
+ if (time_after(jiffies, data->last_updated + HZ) || !data->valid) {
/* Update local register data */
data->reg.vid = i2c_smbus_read_byte_data(client, ATXP1_VID);