From: Matt Ranostay Date: Mon, 25 Jul 2016 00:05:32 +0000 (-0700) Subject: hwmon: (sht3x) set initial jiffies to last_update X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=991f9fa90360b64e8b79688d8ab0f034983a959d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git hwmon: (sht3x) set initial jiffies to last_update Handling the wraparound requires the data->last_update to be set to an initial jiffies value. Otherwise on 32-bit systems you will not be able to request a reading till the 5 minute jiffies rollover happens. Cc: Guenter Roeck Cc: David Frey Signed-off-by: Matt Ranostay Reviewed-by: Jean Delvare Fixes: 7c84f7f80d6fc ("hwmon: add support for Sensirion SHT3x sensors") Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/sht3x.c b/drivers/hwmon/sht3x.c index b73a48832732..6ea99cd6ae79 100644 --- a/drivers/hwmon/sht3x.c +++ b/drivers/hwmon/sht3x.c @@ -720,7 +720,7 @@ static int sht3x_probe(struct i2c_client *client, data->setup.blocking_io = false; data->setup.high_precision = true; data->mode = 0; - data->last_update = 0; + data->last_update = jiffies - msecs_to_jiffies(3000); data->client = client; crc8_populate_msb(sht3x_crc8_table, SHT3X_CRC8_POLYNOMIAL);