From patchwork Wed Jul 2 21:57:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4468191 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DF6B3BEEAA for ; Wed, 2 Jul 2014 21:56:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A6AE20384 for ; Wed, 2 Jul 2014 21:56:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F37C20353 for ; Wed, 2 Jul 2014 21:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754993AbaGBV4K (ORCPT ); Wed, 2 Jul 2014 17:56:10 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:63271 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753293AbaGBV4B (ORCPT ); Wed, 2 Jul 2014 17:56:01 -0400 Received: by mail-wi0-f175.google.com with SMTP id r20so10376352wiv.2 for ; Wed, 02 Jul 2014 14:55:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/soVjylO5rZR7K3oTSfb45DuHqZ+nR+LFaz2DyHhuhc=; b=Po2Ym984yGQ+Jb3XEJiREspgyHxgPY6oO1YIZSK7s1JpHdpq4zJhMsnwjVZIi2T7RP oWCwgASTVLL2AT+mcyDK4oWOVc+tOpJ1DL9ev9489fL1LAexRzGhExWPu0cSGXdkDNOm 7/pJ+aR4K5OAIuhxpO5GTuCeKAHHb4A8RvhzrJBzdfJUX7yk0A6C02r9KXKAlRIlWcJ0 mk74p+4fAYg1ACtX27ehi8tPVShgI1+I8bAuVLjIjiUx/sjFbTH7LAEEwXEGNp77ioCn KIJCePS7VFZ75g9EBBaVcIVvhabtT9ZVsMUBGD7L/v8yN4lPXmYnnqlTRfsNcA7zfeP/ LYPQ== X-Gm-Message-State: ALoCoQmnZ9x4ZRPs7XbupdfXYv/jEx+izmitfaOEfJgBFwW6krMZVs6bP7DyoJLuZYiWTnQnRKKl X-Received: by 10.194.85.78 with SMTP id f14mr623088wjz.36.1404338159283; Wed, 02 Jul 2014 14:55:59 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id bx2sm57644655wjb.47.2014.07.02.14.55.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jul 2014 14:55:58 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Laurent Pinchart , Rob Clark , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: sh_mipi_dsi.c: Cleaning up Boolean used in bitwise operation Date: Wed, 2 Jul 2014 23:57:12 +0200 Message-Id: <1404338232-6708-2-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1404338232-6708-1-git-send-email-rickard_strandqvist@spectrumdigital.se> References: <1404338232-6708-1-git-send-email-rickard_strandqvist@spectrumdigital.se> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Boolean variable is used in bitwise operation. Signed-off-by: Rickard Strandqvist --- drivers/video/fbdev/sh_mipi_dsi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sh_mipi_dsi.c b/drivers/video/fbdev/sh_mipi_dsi.c index 8f6e8ff..39417ab 100644 --- a/drivers/video/fbdev/sh_mipi_dsi.c +++ b/drivers/video/fbdev/sh_mipi_dsi.c @@ -113,11 +113,18 @@ static int sh_mipi_dcs_param(int handle, u8 cmd, u8 param) static void sh_mipi_dsi_enable(struct sh_mipi *mipi, bool enable) { + unsigned int enable_value; + + if (enable) + enable_value = 0x00000003; + else + enable_value = 0x00000002; + /* * enable LCDC data tx, transition to LPS after completion of each HS * packet */ - iowrite32(0x00000002 | enable, mipi->linkbase + DTCTR); + iowrite32(enable_value, mipi->linkbase + DTCTR); } static void sh_mipi_shutdown(struct platform_device *pdev)