]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (sht3x) set initial jiffies to last_update
authorMatt Ranostay <mranostay@gmail.com>
Mon, 25 Jul 2016 00:05:32 +0000 (17:05 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 31 Jul 2016 21:56:36 +0000 (14:56 -0700)
commitb47c488eeb3ca99ef4f0c68cd43d150699c1edae
tree6b38aa01c5caa0f6c55eca9f06a2679bab2e46c1
parent19672c689d9bbd9f440be1f728037c2d4a4fdb43
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 <linux@roeck-us.net>
Cc: David Frey <david.frey@sensirion.com>
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Fixes: 70fac979ef80c ("hwmon: add support for Sensirion SHT3x sensors")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/sht3x.c