Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+3 -2
+3 -2
drivers/rtc/rtc-mv.c
··· 10 10 #include <linux/kernel.h> 11 11 #include <linux/rtc.h> 12 12 #include <linux/bcd.h> 13 + #include <linux/bitops.h> 13 14 #include <linux/io.h> 14 15 #include <linux/platform_device.h> 15 16 #include <linux/of.h> ··· 25 24 #define RTC_MINUTES_OFFS 8 26 25 #define RTC_HOURS_OFFS 16 27 26 #define RTC_WDAY_OFFS 24 28 - #define RTC_HOURS_12H_MODE (1 << 22) /* 12 hours mode */ 27 + #define RTC_HOURS_12H_MODE BIT(22) /* 12 hour mode */ 29 28 30 29 #define RTC_DATE_REG_OFFS 4 31 30 #define RTC_MDAY_OFFS 0 ··· 34 33 35 34 #define RTC_ALARM_TIME_REG_OFFS 8 36 35 #define RTC_ALARM_DATE_REG_OFFS 0xc 37 - #define RTC_ALARM_VALID (1 << 7) 36 + #define RTC_ALARM_VALID BIT(7) 38 37 39 38 #define RTC_ALARM_INTERRUPT_MASK_REG_OFFS 0x10 40 39 #define RTC_ALARM_INTERRUPT_CASUE_REG_OFFS 0x14