hwmon: (occ) Fix poll rate limiting
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: c10e753d ("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>
Please register or sign in to comment