aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThomas Niederprüm2015-05-25 21:29:21 +0200
committerTomi Valkeinen2015-05-27 12:54:48 +0300
commit5e47932be81e860d317498363c13153e7df37625 (patch)
tree1e3266787dbfc19cd7c60ef82c8f1a1762a9edfe /drivers
parentee62eddb1a80e86ccbbbff5a8ecf4c2a2ccf95c9 (diff)
fbdev: ssd1307fb: fix logical error
The logical not needs to be done after the bit masking. Fixes: a3998fe03e87 ("fbdev: ssd1307fb: Unify init code and obtain hw specific bits from DT") Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbdev/ssd1307fb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 9c28a77c2934..3e153c06131a 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -368,7 +368,7 @@ static int ssd1307fb_init(struct ssd1307fb_par *par)
if (ret < 0)
return ret;
- compins = 0x02 | (!par->com_seq & 0x1) << 4
+ compins = 0x02 | !(par->com_seq & 0x1) << 4
| (par->com_lrremap & 0x1) << 5;
ret = ssd1307fb_write_cmd(par->client, compins);
if (ret < 0)