summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorRishiraj Manwatkar <manwatkar@outlook.com>2017-05-20 06:33:17 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-29 16:41:37 +0200
commit675b62d288908eaa6cb2b275c64bbd7973e01259 (patch)
tree7120beb8b45555fb77899fa90344dc8ea4d71157 /drivers/staging
parentca9280d1f82a7a0165a683dc09f182329ebec352 (diff)
staging: fbtft: Fix to avoid precedence issues
Parentheses added to avoid operator precedence issues. Signed-off-by: Rishiraj Manwatkar <manwatkar@outlook.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/fbtft/fb_hx8340bn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/fbtft/fb_hx8340bn.c b/drivers/staging/fbtft/fb_hx8340bn.c
index 1ca1fcd353d6..fbd5ef525243 100644
--- a/drivers/staging/fbtft/fb_hx8340bn.c
+++ b/drivers/staging/fbtft/fb_hx8340bn.c
@@ -157,7 +157,7 @@ static int set_var(struct fbtft_par *par)
* OP0 OP1 CP0 CP1 CP2 CP3 CP4 MP0 MP1 MP2 MP3 MP4 MP5 CGM0 CGM1
* ON0 ON1 CN0 CN1 CN2 CN3 CN4 MN0 MN1 MN2 MN3 MN4 MN5 XXXX GC
*/
-#define CURVE(num, idx) curves[num * par->gamma.num_values + idx]
+#define CURVE(num, idx) curves[(num) * par->gamma.num_values + (idx)]
static int set_gamma(struct fbtft_par *par, u32 *curves)
{
unsigned long mask[] = {