diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/bmp085.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/bmp085.c b/drivers/misc/bmp085.c index 3c534aba6272..b088abc0f45b 100644 --- a/drivers/misc/bmp085.c +++ b/drivers/misc/bmp085.c | |||
@@ -234,7 +234,8 @@ static s32 bmp085_get_pressure(struct bmp085_data *data, int *pressure) | |||
234 | int status; | 234 | int status; |
235 | 235 | ||
236 | /* alt least every second force an update of the ambient temperature */ | 236 | /* alt least every second force an update of the ambient temperature */ |
237 | if (data->last_temp_measurement + 1*HZ < jiffies) { | 237 | if (data->last_temp_measurement == 0 || |
238 | time_is_before_jiffies(data->last_temp_measurement + 1*HZ)) { | ||
238 | status = bmp085_get_temperature(data, NULL); | 239 | status = bmp085_get_temperature(data, NULL); |
239 | if (status != 0) | 240 | if (status != 0) |
240 | goto exit; | 241 | goto exit; |