summaryrefslogtreecommitdiff
path: root/drivers/hwmon/mlxreg-fan.c
diff options
context:
space:
mode:
authorVadim Pasternak <vadimp@mellanox.com>2018-11-16 13:47:11 +0000
committerGuenter Roeck <linux@roeck-us.net>2018-11-16 08:10:23 -0800
commit243cfe3fb8978c7eec24511aba7dac98819ed896 (patch)
treed46297d875233a66a189130c9e8570b096d59714 /drivers/hwmon/mlxreg-fan.c
parent38cd989ee38c16388cde89db5b734f9d55b905f9 (diff)
downloadlwn-243cfe3fb8978c7eec24511aba7dac98819ed896.tar.gz
lwn-243cfe3fb8978c7eec24511aba7dac98819ed896.zip
hwmon: (mlxreg-fan) Fix macros for tacho fault reading
Fix macros for tacometer fault reading. This fix is relevant for three Mellanox systems MQMB7, MSN37, MSN34, which are about to be released to the customers. At the moment, none of them is at customers sites. Fixes: 65afb4c8e7e4 ("hwmon: (mlxreg-fan) Add support for Mellanox FAN driver") Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/mlxreg-fan.c')
-rw-r--r--drivers/hwmon/mlxreg-fan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/mlxreg-fan.c b/drivers/hwmon/mlxreg-fan.c
index de46577c7d5a..d8fa4bea4bc8 100644
--- a/drivers/hwmon/mlxreg-fan.c
+++ b/drivers/hwmon/mlxreg-fan.c
@@ -51,7 +51,7 @@
*/
#define MLXREG_FAN_GET_RPM(rval, d, s) (DIV_ROUND_CLOSEST(15000000 * 100, \
((rval) + (s)) * (d)))
-#define MLXREG_FAN_GET_FAULT(val, mask) (!!((val) ^ (mask)))
+#define MLXREG_FAN_GET_FAULT(val, mask) (!((val) ^ (mask)))
#define MLXREG_FAN_PWM_DUTY2STATE(duty) (DIV_ROUND_CLOSEST((duty) * \
MLXREG_FAN_MAX_STATE, \
MLXREG_FAN_MAX_DUTY))