From patchwork Thu Oct 19 20:06:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 10018251 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7BC2960224 for ; Thu, 19 Oct 2017 20:08:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7060E28D63 for ; Thu, 19 Oct 2017 20:08:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64C7B28E48; Thu, 19 Oct 2017 20:08:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E045728D63 for ; Thu, 19 Oct 2017 20:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753569AbdJSUIp (ORCPT ); Thu, 19 Oct 2017 16:08:45 -0400 Received: from onstation.org ([52.200.56.107]:54130 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750902AbdJSUGj (ORCPT ); Thu, 19 Oct 2017 16:06:39 -0400 Received: from localhost.localdomain (c-98-236-77-125.hsd1.wv.comcast.net [98.236.77.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id D4D891FC0; Thu, 19 Oct 2017 20:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=onstation.org; s=default; t=1508443599; bh=r5iksqFfMBA21X3UARDaJnN/NZlH4lFOdxHzAi5MmHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A2KghCHdbFiPkcH1uZdNoE3eI3HOKnmqARWcaCUtxU/ELeueJ1w6TEt/XAz4XaYEC vxYfaRuxkE74M2D2Sx4nnZsQqJ9DMzjvpjVnmR62Nbm+4M6gNx9ys6C6Yq+fmVX5uW orTL1IPhAZWidEHt76iQq6S7E0USUCmGX5zU0AF8= From: Brian Masney To: jic23@kernel.org, linux-iio@vger.kernel.org Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-kernel@vger.kernel.org, Jon.Brenner@ams.com Subject: [PATCH 08/13] staging: iio: tsl2x7x: correct alignment of parenthesis Date: Thu, 19 Oct 2017 16:06:27 -0400 Message-Id: <20171019200632.25820-9-masneyb@onstation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171019200632.25820-1-masneyb@onstation.org> References: <20171019200632.25820-1-masneyb@onstation.org> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Correct error from checkpatch.pl to improve code readibility: Alignment should match open parenthesis. This involved shortening the name of tsl2x7x_als_gainadj and tsl2x7x_prx_gainadj to tsl2x7x_als_gain and tsl2x7x_prx_gain respectively. This also required removing the ch0lux and ch1lux local variables in order to get the line short enough. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index 6cc89cd6505e..886be9aa3c0f 100644 --- a/drivers/staging/iio/light/tsl2x7x.c +++ b/drivers/staging/iio/light/tsl2x7x.c @@ -243,14 +243,14 @@ static const struct tsl2x7x_settings tsl2x7x_default_settings = { .prox_pulse_count = 8 }; -static const s16 tsl2X7X_als_gainadj[] = { +static const s16 tsl2x7x_als_gain[] = { 1, 8, 16, 120 }; -static const s16 tsl2X7X_prx_gainadj[] = { +static const s16 tsl2x7x_prx_gain[] = { 1, 2, 4, @@ -384,11 +384,10 @@ static int tsl2x7x_get_lux(struct iio_dev *indio_dev) if (p->ratio == 0) { lux = 0; } else { - ch0lux = DIV_ROUND_UP(ch0 * p->ch0, - tsl2X7X_als_gainadj[chip->settings.als_gain]); - ch1lux = DIV_ROUND_UP(ch1 * p->ch1, - tsl2X7X_als_gainadj[chip->settings.als_gain]); - lux = ch0lux - ch1lux; + lux = DIV_ROUND_UP(ch0 * p->ch0, + tsl2x7x_als_gain[chip->settings.als_gain]) - + DIV_ROUND_UP(ch1 * p->ch1, + tsl2x7x_als_gain[chip->settings.als_gain]); } /* note: lux is 31 bit max at this point */ @@ -1263,9 +1262,9 @@ static int tsl2x7x_read_raw(struct iio_dev *indio_dev, break; case IIO_CHAN_INFO_CALIBSCALE: if (chan->type == IIO_LIGHT) - *val = tsl2X7X_als_gainadj[chip->settings.als_gain]; + *val = tsl2x7x_als_gain[chip->settings.als_gain]; else - *val = tsl2X7X_prx_gainadj[chip->settings.prox_gain]; + *val = tsl2x7x_prx_gain[chip->settings.prox_gain]; ret = IIO_VAL_INT; break; case IIO_CHAN_INFO_CALIBBIAS: