linux-stable/drivers/hwmon/occ
Eddie James 550473900f hwmon: (occ) Fix poll rate limiting
[ Upstream commit 5216dff22d ]

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:13:13 +02:00
..
common.c hwmon: (occ) Fix poll rate limiting 2021-05-19 10:13:13 +02:00
common.h hwmon: (occ) Fix poll rate limiting 2021-05-19 10:13:13 +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
p8_i2c.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07: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