From 0cacdf298211ec9e87354cf102f20d070e76e075 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 29 Jul 2005 12:15:12 -0700 Subject: [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 Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds --- drivers/hwmon/atxp1.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/hwmon/atxp1.c') 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 #include #include +#include #include #include #include @@ -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); -- cgit v1.2.3