diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-09-04 16:46:05 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2017-09-05 03:55:04 -0400 |
commit | eb4fd19005b73be8d7f51b564aa87a59a7fb4328 (patch) | |
tree | 5bb0a4e576483feb01a9e9921c2ead5b3f7ced21 | |
parent | 57ec2d9580760ce35d7c54b57f8e5f7e98049b8e (diff) |
rtc: ds1307: use BIT
Use the BIT macro were possbiel.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-rw-r--r-- | drivers/rtc/rtc-ds1307.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 328183e0e121..5b2fe3579e45 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c | |||
@@ -634,11 +634,11 @@ static const struct rtc_class_ops ds13xx_rtc_ops = { | |||
634 | #define RX8130_REG_ALARM_HOUR 0x08 | 634 | #define RX8130_REG_ALARM_HOUR 0x08 |
635 | #define RX8130_REG_ALARM_WEEK_OR_DAY 0x09 | 635 | #define RX8130_REG_ALARM_WEEK_OR_DAY 0x09 |
636 | #define RX8130_REG_EXTENSION 0x0c | 636 | #define RX8130_REG_EXTENSION 0x0c |
637 | #define RX8130_REG_EXTENSION_WADA (1 << 3) | 637 | #define RX8130_REG_EXTENSION_WADA BIT(3) |
638 | #define RX8130_REG_FLAG 0x0d | 638 | #define RX8130_REG_FLAG 0x0d |
639 | #define RX8130_REG_FLAG_AF (1 << 3) | 639 | #define RX8130_REG_FLAG_AF BIT(3) |
640 | #define RX8130_REG_CONTROL0 0x0e | 640 | #define RX8130_REG_CONTROL0 0x0e |
641 | #define RX8130_REG_CONTROL0_AIE (1 << 3) | 641 | #define RX8130_REG_CONTROL0_AIE BIT(3) |
642 | 642 | ||
643 | static irqreturn_t rx8130_irq(int irq, void *dev_id) | 643 | static irqreturn_t rx8130_irq(int irq, void *dev_id) |
644 | { | 644 | { |
@@ -798,11 +798,11 @@ static int rx8130_alarm_irq_enable(struct device *dev, unsigned int enabled) | |||
798 | #define MCP794XX_REG_ALARM0_CTRL 0x0d | 798 | #define MCP794XX_REG_ALARM0_CTRL 0x0d |
799 | #define MCP794XX_REG_ALARM1_BASE 0x11 | 799 | #define MCP794XX_REG_ALARM1_BASE 0x11 |
800 | #define MCP794XX_REG_ALARM1_CTRL 0x14 | 800 | #define MCP794XX_REG_ALARM1_CTRL 0x14 |
801 | # define MCP794XX_BIT_ALMX_IF (1 << 3) | 801 | # define MCP794XX_BIT_ALMX_IF BIT(3) |
802 | # define MCP794XX_BIT_ALMX_C0 (1 << 4) | 802 | # define MCP794XX_BIT_ALMX_C0 BIT(4) |
803 | # define MCP794XX_BIT_ALMX_C1 (1 << 5) | 803 | # define MCP794XX_BIT_ALMX_C1 BIT(5) |
804 | # define MCP794XX_BIT_ALMX_C2 (1 << 6) | 804 | # define MCP794XX_BIT_ALMX_C2 BIT(6) |
805 | # define MCP794XX_BIT_ALMX_POL (1 << 7) | 805 | # define MCP794XX_BIT_ALMX_POL BIT(7) |
806 | # define MCP794XX_MSK_ALMX_MATCH (MCP794XX_BIT_ALMX_C0 | \ | 806 | # define MCP794XX_MSK_ALMX_MATCH (MCP794XX_BIT_ALMX_C0 | \ |
807 | MCP794XX_BIT_ALMX_C1 | \ | 807 | MCP794XX_BIT_ALMX_C1 | \ |
808 | MCP794XX_BIT_ALMX_C2) | 808 | MCP794XX_BIT_ALMX_C2) |
@@ -869,7 +869,7 @@ static int mcp794xx_read_alarm(struct device *dev, struct rtc_wkalrm *t) | |||
869 | t->time.tm_isdst = -1; | 869 | t->time.tm_isdst = -1; |
870 | 870 | ||
871 | dev_dbg(dev, "%s, sec=%d min=%d hour=%d wday=%d mday=%d mon=%d " | 871 | dev_dbg(dev, "%s, sec=%d min=%d hour=%d wday=%d mday=%d mon=%d " |
872 | "enabled=%d polarity=%d irq=%d match=%d\n", __func__, | 872 | "enabled=%d polarity=%d irq=%d match=%lu\n", __func__, |
873 | t->time.tm_sec, t->time.tm_min, t->time.tm_hour, | 873 | t->time.tm_sec, t->time.tm_min, t->time.tm_hour, |
874 | t->time.tm_wday, t->time.tm_mday, t->time.tm_mon, t->enabled, | 874 | t->time.tm_wday, t->time.tm_mday, t->time.tm_mon, t->enabled, |
875 | !!(regs[6] & MCP794XX_BIT_ALMX_POL), | 875 | !!(regs[6] & MCP794XX_BIT_ALMX_POL), |