diff options
author | Jean Delvare <khali@linux-fr.org> | 2005-07-29 21:15:12 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-29 22:12:50 +0200 |
commit | 0cacdf298211ec9e87354cf102f20d070e76e075 (patch) | |
tree | e1bf80422b3508d689210db3b0e1f3bbf075e2ec /drivers/hwmon | |
parent | [PATCH] I2C: Missing space in split strings (diff) | |
download | linux-0cacdf298211ec9e87354cf102f20d070e76e075.tar.xz linux-0cacdf298211ec9e87354cf102f20d070e76e075.zip |
[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')
-rw-r--r-- | drivers/hwmon/atxp1.c | 5 | ||||
-rw-r--r-- | drivers/hwmon/fscpos.c | 4 | ||||
-rw-r--r-- | drivers/hwmon/gl520sm.c | 4 |
3 files changed, 6 insertions, 7 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 @@ #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); 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 @@ #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"); diff --git a/drivers/hwmon/gl520sm.c b/drivers/hwmon/gl520sm.c index a13a504f5bfa..80ae8d30c2af 100644 --- a/drivers/hwmon/gl520sm.c +++ b/drivers/hwmon/gl520sm.c @@ -24,6 +24,7 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/slab.h> +#include <linux/jiffies.h> #include <linux/i2c.h> #include <linux/i2c-sensor.h> #include <linux/i2c-vid.h> @@ -678,8 +679,7 @@ static struct gl520_data *gl520_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) { dev_dbg(&client->dev, "Starting gl520sm update\n"); |