Thread (2 messages) 2 messages, 2 authors, 2015-05-26

Re: [PATCH] fbdev: ssd1307fb: fix logical error

From: Tomi Valkeinen <hidden>
Date: 2015-05-26 07:03:16
Also in: lkml


On 25/05/15 22:29, Thomas Niederprüm wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
Reported-by: Dan Carpenter <redacted>
---
 drivers/video/fbdev/ssd1307fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 8fc224c..9771d56 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)
Thanks, queued for 4.2.

 Tomi

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help