summaryrefslogtreecommitdiff
path: root/drivers/timer
diff options
context:
space:
mode:
authorThomas Chou <thomas@wytron.com.tw>2015-10-29 21:16:39 +0800
committerThomas Chou <thomas@wytron.com.tw>2015-11-06 09:14:11 +0800
commit430b43e8ee55798232f6e1cdd4f5ae486906c3f9 (patch)
tree996a052c4ba8b11179d5c617716cd0e21de150a0 /drivers/timer
parent892414829c7df6b70bc83652bc568c2761b0d1b4 (diff)
timer: altera_timer: use BIT macro
Replace numerical bit shift with BIT macro in altera_timer :%s/(1 << nr)/BIT(nr)/g where nr = 0, 1, 2 .... 31 Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Jagan Teki <jteki@openedev.com>
Diffstat (limited to 'drivers/timer')
-rw-r--r--drivers/timer/altera_timer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c
index 2ef9ad6934..288357c98b 100644
--- a/drivers/timer/altera_timer.c
+++ b/drivers/timer/altera_timer.c
@@ -31,9 +31,9 @@ struct altera_timer_platdata {
};
/* control register */
-#define ALTERA_TIMER_CONT (1 << 1) /* Continuous mode */
-#define ALTERA_TIMER_START (1 << 2) /* Start timer */
-#define ALTERA_TIMER_STOP (1 << 3) /* Stop timer */
+#define ALTERA_TIMER_CONT BIT(1) /* Continuous mode */
+#define ALTERA_TIMER_START BIT(2) /* Start timer */
+#define ALTERA_TIMER_STOP BIT(3) /* Stop timer */
static int altera_timer_get_count(struct udevice *dev, unsigned long *count)
{