diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-06-08 10:16:14 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-06-24 19:13:44 -0400 |
commit | fe5613360102de0dd79102ec2d2e006a5eeb00d8 (patch) | |
tree | c2b25d247ed8abc76443f479be19f4e54ca8490f /drivers/rtc | |
parent | b2bd2370a25b78a7090ac701836d414cdb731bea (diff) |
rtc: mv: use BIT()
Use bit instead of hand coding the shift and correct the 24 hour vs 24
hours typo.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-mv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-mv.c b/drivers/rtc/rtc-mv.c index 423762241042..7e84bb4072ad 100644 --- a/drivers/rtc/rtc-mv.c +++ b/drivers/rtc/rtc-mv.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/rtc.h> | 11 | #include <linux/rtc.h> |
12 | #include <linux/bcd.h> | 12 | #include <linux/bcd.h> |
13 | #include <linux/bitops.h> | ||
13 | #include <linux/io.h> | 14 | #include <linux/io.h> |
14 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
15 | #include <linux/of.h> | 16 | #include <linux/of.h> |
@@ -24,7 +25,7 @@ | |||
24 | #define RTC_MINUTES_OFFS 8 | 25 | #define RTC_MINUTES_OFFS 8 |
25 | #define RTC_HOURS_OFFS 16 | 26 | #define RTC_HOURS_OFFS 16 |
26 | #define RTC_WDAY_OFFS 24 | 27 | #define RTC_WDAY_OFFS 24 |
27 | #define RTC_HOURS_12H_MODE (1 << 22) /* 12 hours mode */ | 28 | #define RTC_HOURS_12H_MODE BIT(22) /* 12 hour mode */ |
28 | 29 | ||
29 | #define RTC_DATE_REG_OFFS 4 | 30 | #define RTC_DATE_REG_OFFS 4 |
30 | #define RTC_MDAY_OFFS 0 | 31 | #define RTC_MDAY_OFFS 0 |
@@ -33,7 +34,7 @@ | |||
33 | 34 | ||
34 | #define RTC_ALARM_TIME_REG_OFFS 8 | 35 | #define RTC_ALARM_TIME_REG_OFFS 8 |
35 | #define RTC_ALARM_DATE_REG_OFFS 0xc | 36 | #define RTC_ALARM_DATE_REG_OFFS 0xc |
36 | #define RTC_ALARM_VALID (1 << 7) | 37 | #define RTC_ALARM_VALID BIT(7) |
37 | 38 | ||
38 | #define RTC_ALARM_INTERRUPT_MASK_REG_OFFS 0x10 | 39 | #define RTC_ALARM_INTERRUPT_MASK_REG_OFFS 0x10 |
39 | #define RTC_ALARM_INTERRUPT_CASUE_REG_OFFS 0x14 | 40 | #define RTC_ALARM_INTERRUPT_CASUE_REG_OFFS 0x14 |