diff options
author | Vadim Pasternak <vadimp@mellanox.com> | 2018-11-20 23:16:36 +0000 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2018-12-16 15:13:16 -0800 |
commit | 3f9ffa5c3a25bf2a3c880b07f620c8ef029dc261 (patch) | |
tree | 9bfd86347cbb61635fc5d2202fde2d7ace56c37a /drivers | |
parent | 9a629d7ada78c32e2100eb5ca6a25c6248d90bd9 (diff) | |
download | lwn-3f9ffa5c3a25bf2a3c880b07f620c8ef029dc261.tar.gz lwn-3f9ffa5c3a25bf2a3c880b07f620c8ef029dc261.zip |
hwmon: (mlxreg-fan) Modify macros for tachometer fault status reading
Modify macros for tachometer fault status reading for making it more
simple and clear.
Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/mlxreg-fan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/mlxreg-fan.c b/drivers/hwmon/mlxreg-fan.c index d8fa4bea4bc8..db8c6de0b6a0 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)) |