linux-brain/drivers/hwmon/occ
Eddie James 1648505d13 hwmon: (occ) Fix poll rate limiting
[ Upstream commit 5216dff22dc2bbbbe6f00335f9fd2879670e753b ]

The poll rate limiter time was initialized at zero. This breaks the
comparison in time_after if jiffies is large. Switch to storing the
next update time rather than the previous time, and initialize the
time when the device is probed.

Fixes: c10e753d43 ("hwmon (occ): Add sensor types and versions")
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20210429151336.18980-1-eajames@linux.ibm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-19 10:08:30 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
common.c hwmon: (occ) Fix poll rate limiting 2021-05-19 10:08:30 +02:00
common.h hwmon: (occ) Fix poll rate limiting 2021-05-19 10:08:30 +02:00
p8_i2c.c hwmon: (occ) Fix license headers 2019-02-18 14:23:29 -08:00
p9_sbe.c hwmon: (occ) Fix license headers 2019-02-18 14:23:29 -08:00
sysfs.c hwmon: (occ) Prevent sysfs error attribute from returning error 2019-04-16 15:13:54 -07:00