|
@@ -234,7 +234,8 @@ static s32 bmp085_get_pressure(struct bmp085_data *data, int *pressure)
|
|
|
int status;
|
|
int status;
|
|
|
|
|
|
|
|
/* alt least every second force an update of the ambient temperature */
|
|
/* alt least every second force an update of the ambient temperature */
|
|
|
- if (data->last_temp_measurement + 1*HZ < jiffies) {
|
|
|
|
|
|
|
+ if (data->last_temp_measurement == 0 ||
|
|
|
|
|
+ time_is_before_jiffies(data->last_temp_measurement + 1*HZ)) {
|
|
|
status = bmp085_get_temperature(data, NULL);
|
|
status = bmp085_get_temperature(data, NULL);
|
|
|
if (status != 0)
|
|
if (status != 0)
|
|
|
goto exit;
|
|
goto exit;
|