summaryrefslogtreecommitdiff
path: root/drivers/clk/meson
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2017-03-09 13:41:46 +0300
committerMichael Turquette <mturquette@baylibre.com>2017-03-27 22:29:51 +0300
commit1ddfe82ed84a6bf09eef9067c2dc093c758eb4b4 (patch)
tree62834d814fe6c68f547c6cae487b2a223cb64095 /drivers/clk/meson
parentc1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201 (diff)
downloadlinux-1ddfe82ed84a6bf09eef9067c2dc093c758eb4b4.tar.xz
clk: meson: fix SET_PARM macro
parameter val is not enclosed in parenthesis which is buggy when given an expression instead of a simple value Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Michael Turquette <mturquette@baylibre.com> Link: lkml.kernel.org/r/20170309104154.28295-2-jbrunet@baylibre.com
Diffstat (limited to 'drivers/clk/meson')
-rw-r--r--drivers/clk/meson/clkc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h
index 9bb70e7a7d6a..c6be77dd8694 100644
--- a/drivers/clk/meson/clkc.h
+++ b/drivers/clk/meson/clkc.h
@@ -25,7 +25,7 @@
#define PARM_GET(width, shift, reg) \
(((reg) & SETPMASK(width, shift)) >> (shift))
#define PARM_SET(width, shift, reg, val) \
- (((reg) & CLRPMASK(width, shift)) | (val << (shift)))
+ (((reg) & CLRPMASK(width, shift)) | ((val) << (shift)))
#define MESON_PARM_APPLICABLE(p) (!!((p)->width))