]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (occ) Store error condition for rate-limited polls
authorEddie James <eajames@linux.ibm.com>
Tue, 16 Apr 2019 15:43:48 +0000 (15:43 +0000)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 16 Apr 2019 22:12:13 +0000 (15:12 -0700)
commite190b48081431b3f86682cb12e6ac53ed5220554
treefcfb20d259c7a37a785718d90892b9f61db7888d
parent711ecb81a32b802ac00f07c21c6b4b936d81041c
hwmon: (occ) Store error condition for rate-limited polls

The OCC driver limits the rate of sending poll commands to the OCC. If a
user reads a hwmon entry after a poll response resulted in an error and
is rate-limited, the error is invisible to the user. Fix this by storing
the last error and returning that in the rate-limited case.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/occ/common.c
drivers/hwmon/occ/common.h