armbian-build/patch/kernel/odroidc2-next/0064-clk-meson-fix-SET_PARAM-macro.patch
2017-05-21 18:44:19 +02:00

30 lines
944 B
Diff

From e372a783aeeb501b21a5d3d5a0a5d230395d09e1 Mon Sep 17 00:00:00 2001
From: Jerome Brunet <jbrunet@baylibre.com>
Date: Mon, 13 Feb 2017 23:56:13 +0100
Subject: [PATCH 64/93] clk: meson: fix SET_PARAM macro
param val is not enclosed in parathesis which is buggy when given an
expression instead of simple value
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
drivers/clk/meson/clkc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h
index 22a6335..153b111 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))
--
1.9.1