summaryrefslogtreecommitdiff
path: root/drivers/clocksource/sun4i_timer.c
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2013-07-16 16:45:37 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2013-07-18 15:27:13 +0200
commitbb008b9e873f5544120dcd401316b4c0e7743dde (patch)
tree2501d3e37f5097ded1e4e4bfca51b9f15c78f8dd /drivers/clocksource/sun4i_timer.c
parent40777645eb7fe5b9184b339e1a8aa889993f6d75 (diff)
clocksource: sun4i: Wrap macros arguments in parenthesis
The macros were not using parenthesis to escape the arguments passed to them. It is pretty unsafe, so add those parenthesis. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource/sun4i_timer.c')
-rw-r--r--drivers/clocksource/sun4i_timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c
index bdf34d9910cb..34ab6580ad1c 100644
--- a/drivers/clocksource/sun4i_timer.c
+++ b/drivers/clocksource/sun4i_timer.c
@@ -30,8 +30,8 @@
#define TIMER_CTL_ENABLE BIT(0)
#define TIMER_CTL_AUTORELOAD BIT(1)
#define TIMER_CTL_ONESHOT BIT(7)
-#define TIMER_INTVAL_REG(val) (0x10 * val + 0x14)
-#define TIMER_CNTVAL_REG(val) (0x10 * val + 0x18)
+#define TIMER_INTVAL_REG(val) (0x10 * (val) + 0x14)
+#define TIMER_CNTVAL_REG(val) (0x10 * (val) + 0x18)
#define TIMER_SCAL 16