diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-09-23 14:16:57 +0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2013-10-13 22:01:57 +0400 |
commit | 4c4e45669de475573b15d968a6dca8d00124c9ad (patch) | |
tree | 8a130de54ec83c58335679853b1f203992efdcb4 | |
parent | 8612ed0d97abcf1c016d34755b7cf2060de71963 (diff) | |
download | linux-4c4e45669de475573b15d968a6dca8d00124c9ad.tar.xz |
watchdog: kempld_wdt: Fix bit mask definition
STAGE_CFG bits are defined as [5:4] bits. However, '(((x) & 0x30) << 4)'
handles [9:8] bits. Thus, it should be fixed in order to handle
[5:4] bits.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r-- | drivers/watchdog/kempld_wdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/kempld_wdt.c b/drivers/watchdog/kempld_wdt.c index 491419e0772a..5c3d4df63e68 100644 --- a/drivers/watchdog/kempld_wdt.c +++ b/drivers/watchdog/kempld_wdt.c @@ -35,7 +35,7 @@ #define KEMPLD_WDT_STAGE_TIMEOUT(x) (0x1b + (x) * 4) #define KEMPLD_WDT_STAGE_CFG(x) (0x18 + (x)) #define STAGE_CFG_GET_PRESCALER(x) (((x) & 0x30) >> 4) -#define STAGE_CFG_SET_PRESCALER(x) (((x) & 0x30) << 4) +#define STAGE_CFG_SET_PRESCALER(x) (((x) & 0x3) << 4) #define STAGE_CFG_PRESCALER_MASK 0x30 #define STAGE_CFG_ACTION_MASK 0x7 #define STAGE_CFG_ASSERT (1 << 3) |