From patchwork Sun Nov 5 18:00:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harinath Nampally X-Patchwork-Id: 10042395 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 A31BF60244 for ; Sun, 5 Nov 2017 18:00:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84F372913B for ; Sun, 5 Nov 2017 18:00:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79C2129149; Sun, 5 Nov 2017 18:00:42 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 30C072913B for ; Sun, 5 Nov 2017 18:00:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750748AbdKESAN (ORCPT ); Sun, 5 Nov 2017 13:00:13 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:49177 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbdKESAJ (ORCPT ); Sun, 5 Nov 2017 13:00:09 -0500 Received: by mail-io0-f195.google.com with SMTP id n137so13427059iod.6; Sun, 05 Nov 2017 10:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=W4DiRp7N248fS3bRZkw3tFbyCfm74ETzHI27vuApze4=; b=GBp7upVHhtRplugZrNXULazbTNqdPFvYJsK9ayuf3vx7n5PRnb7twc6nYKz+Nbl7f5 sf+biucRAFD6cgToBDmjqOeJkD5i6LR5936ALbC8fIgJY/Oq2f8oi0ohLW/6cC3Zraf0 ApVcsCvepKBPB721ts6K0Hixb+Fn38XusHx2/XgmwDvrMb2dnRwHY3q0nUIULtCbTUMz EY4TDH//SlOHYxOI7VOEBv9d+4JzGyYY3nxKuCWt52uqv4/r1xnx+/Uxkyl0W6aXME7b cFXNKnRjgsW9BERGAjOZvQdxEkPRd82ib5Zte3dEh/amvTk4DtT9G4D53QkiI4ptp1Gl MCQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=W4DiRp7N248fS3bRZkw3tFbyCfm74ETzHI27vuApze4=; b=DugI4kHeNbo1yXGnl+KAPb+A/qJsibLQziePMH02ijdexgiGTuCQUYmNp7xYgT7613 73cvkU2GzQ3LffJjfE5g20m9VLmpj1UCLNdZ2d0nWV4sO0jofQ0tBk3nLG0BnGWYxGWi A2VPbJXVYjZl+ScwkgaN4I8vocOt9qaMKHG/08d1hIoDJzk6WzGMvC/PoCbbimQv2++n jSIUb3XnXQNOoF1tMTA8XhMEVShv6YcRaW68CvIMEl7IfvYumzNPTxVq5JLgRzmxx1hC 0tR920TPr3N8STXxMWSPqHmdP7njoJjE0gEY8P4xkYleNV//KVWQJ957GNTvhv8MLslD CIhQ== X-Gm-Message-State: AJaThX79I/0AANKQ43V8bREOXN2nVtJRMH8rxqniuqj+P5fMHpF25ljj /RPoIvTiEe453vXVFnJvTk4= X-Google-Smtp-Source: ABhQp+Sspy9BDbbjJahxqs259PfDMzP3Jgd90BarqbTZgvK8R6CYWV+jiQkE7kcfnohdKswpUJ/PjA== X-Received: by 10.107.29.138 with SMTP id d132mr16906905iod.201.1509904809082; Sun, 05 Nov 2017 10:00:09 -0800 (PST) Received: from hary-Aspire-X3400G.Belkin ([97.70.80.173]) by smtp.googlemail.com with ESMTPSA id t70sm4811315ioi.72.2017.11.05.10.00.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 05 Nov 2017 10:00:08 -0800 (PST) From: Harinath Nampally To: jic23@kernel.org Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, amsfield22@gmail.com, martink@posteo.de Subject: [PATCH v4 2/2] iio: accel: mma8452: Rename config structs for readability Date: Sun, 5 Nov 2017 13:00:03 -0500 Message-Id: <1509904804-4608-3-git-send-email-harinath922@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509904804-4608-1-git-send-email-harinath922@gmail.com> References: <1509904804-4608-1-git-send-email-harinath922@gmail.com> 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 Rename structs holding event configuration registers to more appropriate names. This naming is consistent with the event config register names given in the mma845x and fxls8471 datasheets. Signed-off-by: Harinath Nampally Acked-by: Martin Kepplinger --- v4: Shorter subject line and better description in commit message drivers/iio/accel/mma8452.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c index 16adf47..43c3a6b 100644 --- a/drivers/iio/accel/mma8452.c +++ b/drivers/iio/accel/mma8452.c @@ -135,7 +135,7 @@ struct mma8452_event_regs { u8 ev_count; }; -static const struct mma8452_event_regs ev_regs_accel_falling = { +static const struct mma8452_event_regs ff_mt_ev_regs = { .ev_cfg = MMA8452_FF_MT_CFG, .ev_cfg_ele = MMA8452_FF_MT_CFG_ELE, .ev_cfg_chan_shift = MMA8452_FF_MT_CHAN_SHIFT, @@ -145,7 +145,7 @@ static const struct mma8452_event_regs ev_regs_accel_falling = { .ev_count = MMA8452_FF_MT_COUNT }; -static const struct mma8452_event_regs ev_regs_accel_rising = { +static const struct mma8452_event_regs trans_ev_regs = { .ev_cfg = MMA8452_TRANSIENT_CFG, .ev_cfg_ele = MMA8452_TRANSIENT_CFG_ELE, .ev_cfg_chan_shift = MMA8452_TRANSIENT_CHAN_SHIFT, @@ -777,12 +777,12 @@ static int mma8452_get_event_regs(struct mma8452_data *data, & MMA8452_INT_TRANS) && (data->chip_info->enabled_events & MMA8452_INT_TRANS)) - *ev_reg = &ev_regs_accel_rising; + *ev_reg = &trans_ev_regs; else - *ev_reg = &ev_regs_accel_falling; + *ev_reg = &ff_mt_ev_regs; return 0; case IIO_EV_DIR_FALLING: - *ev_reg = &ev_regs_accel_falling; + *ev_reg = &ff_mt_ev_regs; return 0; default: return -EINVAL;