diff options
author | Guenter Roeck <linux@roeck-us.net> | 2015-08-17 16:17:24 -0700 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2015-08-19 09:08:17 -0700 |
commit | 2c052d4280ca48fddc7a9ffd2329ada3628cab86 (patch) | |
tree | 7e2e20a28d8c5113e6fb64af40e805097997f109 /drivers/hwmon/pmbus/max34440.c | |
parent | 228b687d9e20f367e4d5ea8723e3abbf0892db61 (diff) |
hwmon: (pmbus) Use BIT macro
Using the BIT macro makes the code a little easier to read.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/pmbus/max34440.c')
-rw-r--r-- | drivers/hwmon/pmbus/max34440.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/hwmon/pmbus/max34440.c b/drivers/hwmon/pmbus/max34440.c index 7e930c3ce1ab..74a1f6f68fb3 100644 --- a/drivers/hwmon/pmbus/max34440.c +++ b/drivers/hwmon/pmbus/max34440.c @@ -19,6 +19,7 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <linux/bitops.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> @@ -38,10 +39,10 @@ enum chips { max34440, max34441, max34446, max34460, max34461 }; #define MAX34446_MFR_IOUT_AVG 0xe2 #define MAX34446_MFR_TEMPERATURE_AVG 0xe3 -#define MAX34440_STATUS_OC_WARN (1 << 0) -#define MAX34440_STATUS_OC_FAULT (1 << 1) -#define MAX34440_STATUS_OT_FAULT (1 << 5) -#define MAX34440_STATUS_OT_WARN (1 << 6) +#define MAX34440_STATUS_OC_WARN BIT(0) +#define MAX34440_STATUS_OC_FAULT BIT(1) +#define MAX34440_STATUS_OT_FAULT BIT(5) +#define MAX34440_STATUS_OT_WARN BIT(6) struct max34440_data { int id; |