diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-07-29 15:15:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-29 16:12:50 -0400 |
commit | 0cacdf298211ec9e87354cf102f20d070e76e075 (patch) | |
tree | e1bf80422b3508d689210db3b0e1f3bbf075e2ec /drivers/hwmon/fscpos.c | |
parent | 368609c5a8bd75b77721e69726ddfd3c6a30f7d4 (diff) |
[PATCH] I2C: use time_after in 3 chip drivers
A few i2c drivers were not updated to use time_after() yet.
Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/hwmon/fscpos.c')
-rw-r--r-- | drivers/hwmon/fscpos.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/fscpos.c b/drivers/hwmon/fscpos.c index 3beaa6191ef4..270015b626ad 100644 --- a/drivers/hwmon/fscpos.c +++ b/drivers/hwmon/fscpos.c | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/module.h> | 33 | #include <linux/module.h> |
34 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
35 | #include <linux/jiffies.h> | ||
35 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
36 | #include <linux/i2c-sensor.h> | 37 | #include <linux/i2c-sensor.h> |
37 | #include <linux/init.h> | 38 | #include <linux/init.h> |
@@ -572,8 +573,7 @@ static struct fscpos_data *fscpos_update_device(struct device *dev) | |||
572 | 573 | ||
573 | down(&data->update_lock); | 574 | down(&data->update_lock); |
574 | 575 | ||
575 | if ((jiffies - data->last_updated > 2 * HZ) || | 576 | if (time_after(jiffies, data->last_updated + 2 * HZ) || !data->valid) { |
576 | (jiffies < data->last_updated) || !data->valid) { | ||
577 | int i; | 577 | int i; |
578 | 578 | ||
579 | dev_dbg(&client->dev, "Starting fscpos update\n"); | 579 | dev_dbg(&client->dev, "Starting fscpos update\n"); |