linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbdev: ssd1307fb: fix logical error
@ 2015-05-25 19:29 Thomas Niederprüm
  2015-05-26  7:02 ` Tomi Valkeinen
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Niederprüm @ 2015-05-25 19:29 UTC (permalink / raw)
  To: plagnioj, tomi.valkeinen, maxime.ripard, kernel, dan.carpenter,
	prabhakar.csengg
  Cc: linux-fbdev, linux-kernel, Thomas Niederprüm

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>
---
 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)
-- 
2.3.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-26  7:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-25 19:29 [PATCH] fbdev: ssd1307fb: fix logical error Thomas Niederprüm
2015-05-26  7:02 ` Tomi Valkeinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).