From patchwork Thu Oct 19 20:06:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 10018231 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 04A9360224 for ; Thu, 19 Oct 2017 20:07:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBDD528D63 for ; Thu, 19 Oct 2017 20:07:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF25428E42; Thu, 19 Oct 2017 20:07:11 +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=ham 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 6F99228D63 for ; Thu, 19 Oct 2017 20:07:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751963AbdJSUGl (ORCPT ); Thu, 19 Oct 2017 16:06:41 -0400 Received: from onstation.org ([52.200.56.107]:54068 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752706AbdJSUGk (ORCPT ); Thu, 19 Oct 2017 16:06:40 -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 943601B788; Thu, 19 Oct 2017 20:06:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=onstation.org; s=default; t=1508443599; bh=lgnoRb6kD88CnivFySNGrS4WecMWcWf24VkV23eNlo4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GsqaMWpjnRNdksLqny+2ru++1a49lw5G3w2nlT1kvkDGT9uV8QhZer+5vRWGk76V2 BaA2LctDsP77SS46WpHSyY4ueHc31CP6HaH61rMmikpDli5j4l1aWr5oa1rkDla3z6 sIuYWrfiirl0ouaVJIL0pl/ogqOMwDmn1L1OjD8I= 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 10/13] staging: iio: tsl2x7x: rename power defines to improve code readability Date: Thu, 19 Oct 2017 16:06:29 -0400 Message-Id: <20171019200632.25820-11-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 The LED power defines are named like TSL2X7X_mAXXX. Rename these values to TSL2X7X_XXX_mA to improve code readability. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index 70007117d985..bb9fb60509cf 100644 --- a/drivers/staging/iio/light/tsl2x7x.c +++ b/drivers/staging/iio/light/tsl2x7x.c @@ -114,10 +114,10 @@ #define TSL2X7X_DIODE_BOTH 0x30 /* LED Power */ -#define TSL2X7X_mA100 0x00 -#define TSL2X7X_mA50 0x40 -#define TSL2X7X_mA25 0x80 -#define TSL2X7X_mA13 0xD0 +#define TSL2X7X_100_mA 0x00 +#define TSL2X7X_50_mA 0x40 +#define TSL2X7X_25_mA 0x80 +#define TSL2X7X_13_mA 0xD0 #define TSL2X7X_MAX_TIMER_CNT 0xFF #define TSL2X7X_MIN_ITIME 3 @@ -636,7 +636,7 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev) /* Set the gain based on tsl2x7x_settings struct */ chip->tsl2x7x_config[TSL2X7X_GAIN] = chip->settings.als_gain | - (TSL2X7X_mA100 | TSL2X7X_DIODE1) | + (TSL2X7X_100_mA | TSL2X7X_DIODE1) | (chip->settings.prox_gain << 2); /* set chip struct re scaling and saturation */