aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/fscpos.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/fscpos.c')
-rw-r--r--drivers/hwmon/fscpos.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/fscpos.c b/drivers/hwmon/fscpos.c
index 3beaa6191ef..270015b626a 100644
--- a/drivers/hwmon/fscpos.c
+++ b/drivers/hwmon/fscpos.c
@@ -32,6 +32,7 @@
#include <linux/module.h>
#include <linux/slab.h>
+#include <linux/jiffies.h>
#include <linux/i2c.h>
#include <linux/i2c-sensor.h>
#include <linux/init.h>
@@ -572,8 +573,7 @@ static struct fscpos_data *fscpos_update_device(struct device *dev)
down(&data->update_lock);
- if ((jiffies - data->last_updated > 2 * HZ) ||
- (jiffies < data->last_updated) || !data->valid) {
+ if (time_after(jiffies, data->last_updated + 2 * HZ) || !data->valid) {
int i;
dev_dbg(&client->dev, "Starting fscpos update\n");