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/gl520sm.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/gl520sm.c')
-rw-r--r-- | drivers/hwmon/gl520sm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/gl520sm.c b/drivers/hwmon/gl520sm.c index a13a504f5bf..80ae8d30c2a 100644 --- a/drivers/hwmon/gl520sm.c +++ b/drivers/hwmon/gl520sm.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/jiffies.h> | ||
27 | #include <linux/i2c.h> | 28 | #include <linux/i2c.h> |
28 | #include <linux/i2c-sensor.h> | 29 | #include <linux/i2c-sensor.h> |
29 | #include <linux/i2c-vid.h> | 30 | #include <linux/i2c-vid.h> |
@@ -678,8 +679,7 @@ static struct gl520_data *gl520_update_device(struct device *dev) | |||
678 | 679 | ||
679 | down(&data->update_lock); | 680 | down(&data->update_lock); |
680 | 681 | ||
681 | if ((jiffies - data->last_updated > 2 * HZ) || | 682 | if (time_after(jiffies, data->last_updated + 2 * HZ) || !data->valid) { |
682 | (jiffies < data->last_updated) || !data->valid) { | ||
683 | 683 | ||
684 | dev_dbg(&client->dev, "Starting gl520sm update\n"); | 684 | dev_dbg(&client->dev, "Starting gl520sm update\n"); |
685 | 685 | ||