提交 fe561336 编写于 作者: A Alexandre Belloni

rtc: mv: use BIT()

Use bit instead of hand coding the shift and correct the 24 hour vs 24
hours typo.
Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
上级 b2bd2370
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/rtc.h> #include <linux/rtc.h>
#include <linux/bcd.h> #include <linux/bcd.h>
#include <linux/bitops.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/of.h> #include <linux/of.h>
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
#define RTC_MINUTES_OFFS 8 #define RTC_MINUTES_OFFS 8
#define RTC_HOURS_OFFS 16 #define RTC_HOURS_OFFS 16
#define RTC_WDAY_OFFS 24 #define RTC_WDAY_OFFS 24
#define RTC_HOURS_12H_MODE (1 << 22) /* 12 hours mode */ #define RTC_HOURS_12H_MODE BIT(22) /* 12 hour mode */
#define RTC_DATE_REG_OFFS 4 #define RTC_DATE_REG_OFFS 4
#define RTC_MDAY_OFFS 0 #define RTC_MDAY_OFFS 0
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
#define RTC_ALARM_TIME_REG_OFFS 8 #define RTC_ALARM_TIME_REG_OFFS 8
#define RTC_ALARM_DATE_REG_OFFS 0xc #define RTC_ALARM_DATE_REG_OFFS 0xc
#define RTC_ALARM_VALID (1 << 7) #define RTC_ALARM_VALID BIT(7)
#define RTC_ALARM_INTERRUPT_MASK_REG_OFFS 0x10 #define RTC_ALARM_INTERRUPT_MASK_REG_OFFS 0x10
#define RTC_ALARM_INTERRUPT_CASUE_REG_OFFS 0x14 #define RTC_ALARM_INTERRUPT_CASUE_REG_OFFS 0x14
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册