diff options
author | Guenter Roeck <linux@roeck-us.net> | 2015-08-18 02:17:24 +0300 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2015-08-19 19:08:17 +0300 |
commit | 2c052d4280ca48fddc7a9ffd2329ada3628cab86 (patch) | |
tree | 7e2e20a28d8c5113e6fb64af40e805097997f109 /drivers/hwmon/pmbus/zl6100.c | |
parent | 228b687d9e20f367e4d5ea8723e3abbf0892db61 (diff) | |
download | linux-2c052d4280ca48fddc7a9ffd2329ada3628cab86.tar.xz |
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/zl6100.c')
-rw-r--r-- | drivers/hwmon/pmbus/zl6100.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/hwmon/pmbus/zl6100.c b/drivers/hwmon/pmbus/zl6100.c index 819644121259..771802d7e20d 100644 --- a/drivers/hwmon/pmbus/zl6100.c +++ b/drivers/hwmon/pmbus/zl6100.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> @@ -44,16 +45,16 @@ struct zl6100_data { #define ZL6100_MFR_CONFIG 0xd0 #define ZL6100_DEVICE_ID 0xe4 -#define ZL6100_MFR_XTEMP_ENABLE (1 << 7) +#define ZL6100_MFR_XTEMP_ENABLE BIT(7) #define MFR_VMON_OV_FAULT_LIMIT 0xf5 #define MFR_VMON_UV_FAULT_LIMIT 0xf6 #define MFR_READ_VMON 0xf7 -#define VMON_UV_WARNING (1 << 5) -#define VMON_OV_WARNING (1 << 4) -#define VMON_UV_FAULT (1 << 1) -#define VMON_OV_FAULT (1 << 0) +#define VMON_UV_WARNING BIT(5) +#define VMON_OV_WARNING BIT(4) +#define VMON_UV_FAULT BIT(1) +#define VMON_OV_FAULT BIT(0) #define ZL6100_WAIT_TIME 1000 /* uS */ |