Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751311AbbEYTZJ (ORCPT ); Mon, 25 May 2015 15:25:09 -0400 Received: from mailgw1.uni-kl.de ([131.246.120.220]:37626 "EHLO mailgw1.uni-kl.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750914AbbEYTYy (ORCPT ); Mon, 25 May 2015 15:24:54 -0400 From: =?UTF-8?q?Thomas=20Niederpr=C3=BCm?= To: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, maxime.ripard@free-electrons.com, kernel@pengutronix.de, dan.carpenter@oracle.com, prabhakar.csengg@gmail.com Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Thomas=20Niederpr=C3=BCm?= Subject: [PATCH] fbdev: ssd1307fb: fix logical error Date: Mon, 25 May 2015 21:29:21 +0200 Message-Id: <1432582161-14684-1-git-send-email-niederp@physik.uni-kl.de> X-Mailer: git-send-email 2.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1104 Lines: 32 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 Reported-by: Dan Carpenter --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/