From patchwork Mon Sep 25 03:15:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harinath Nampally X-Patchwork-Id: 9969193 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 AEF4860365 for ; Mon, 25 Sep 2017 03:16:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A337628C07 for ; Mon, 25 Sep 2017 03:16:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9849D28C0C; Mon, 25 Sep 2017 03:16: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.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 46CD328C07 for ; Mon, 25 Sep 2017 03:16:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932604AbdIYDPn (ORCPT ); Sun, 24 Sep 2017 23:15:43 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:36562 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932588AbdIYDPl (ORCPT ); Sun, 24 Sep 2017 23:15:41 -0400 Received: by mail-oi0-f65.google.com with SMTP id a74so2932838oib.3; Sun, 24 Sep 2017 20:15:41 -0700 (PDT) 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=xjrf0bJM155zp0Qs7HzrTnxdDtagB1205VJRDBMYCUQ=; b=f3WFWvzKev1CMXghjUT6lRaiqSNUQVnhsHTmxZEi8fnaRg/cEx3779uLdIKJp6uoLq qUJXerbiubHDw751ye0kwOYWJTrq+GQ8lFzMuq9VvCw1NmCXO36rFXcq7cLy2LEjYXlP 4EnL5w6OIXkpoTe/lV2stFjmXo+l4ArH6/OVvLeyvwLOAb/B9qAXp6rjBKUP3d9U8T61 2BPVeF612fXpoEjkpIShNnGuwJWBbKy4baLppOq0Qkw97+g0y3Z7d3fL1eQjSnVovLs6 HvzCgvhWniXI2bn4jtsiCUgVN2GWd50e4hqYNLvV63qZQahs7QEEeCk+u/6nW/5vHR1z +xWw== 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=xjrf0bJM155zp0Qs7HzrTnxdDtagB1205VJRDBMYCUQ=; b=keihfLBwVouS2RkCd11+XIBD8rvVnFo7u66c4KIkn3IvRddpn1zuf4VHvO0cH3r8Wo e01j2lyQovYoVSDKMzZYtT3vEtIar7tE60IlLduXW6X7NaqQkcM38KwikMsYZFvcYjka Aox7ylCXCdg5fxDMyZ7f1doUa19cwh5IIks4H8KUM0apLbpDkvJj+ZrU4ZDFjOqSWVCa zSSwAx8BnwsaUf2Uqi7AQSQrUExtF2AT5dHh/Gc9Tj9JQChuT6B0Kr63BzBgTXN+qP4k 7ExkJ1NYNTWgJii6uFQ1XWCmZrSOcvcWF75GoSuZH6EcnJKFgCo2YMxVpvQ0n8tG8TAt 8ZpA== X-Gm-Message-State: AHPjjUi80krlihKPVtCJKSHm33L8phEiHsexsvaIIsXs90dj18irTRpp H0WBgmyUkWsPaiRmje9FVnw= X-Google-Smtp-Source: AOwi7QCVnh7EsRcKgsUEVZCFaUh6yH2AQClvcSLwPZbzamQHG1cYZ0GKO1xIwJQWAp5NXjLxbmQbQQ== X-Received: by 10.202.75.149 with SMTP id y143mr7718905oia.34.1506309340751; Sun, 24 Sep 2017 20:15:40 -0700 (PDT) Received: from hary-Aspire-X3400G.Belkin ([97.70.80.173]) by smtp.googlemail.com with ESMTPSA id i32sm99603ote.76.2017.09.24.20.15.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 24 Sep 2017 20:15:39 -0700 (PDT) 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 2/3] iio: accel: mma8452: Rename read/write event value callbacks to generic function name. Date: Sun, 24 Sep 2017 23:15:32 -0400 Message-Id: <1506309333-1970-3-git-send-email-harinath922@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506309333-1970-1-git-send-email-harinath922@gmail.com> References: <1506309333-1970-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 'mma8452_read_thresh' and 'mma8452_write_thresh' functions does more than just read/write threshold values. They also handle IIO_EV_INFO_HIGH_PASS_FILTER_3DB and IIO_EV_INFO_PERIOD therefore renaming to generic names. Improves code readability, no impact on functionality. Signed-off-by: Harinath Nampally --- drivers/iio/accel/mma8452.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c index 74b6221..43c3a6b 100644 --- a/drivers/iio/accel/mma8452.c +++ b/drivers/iio/accel/mma8452.c @@ -792,7 +792,7 @@ static int mma8452_get_event_regs(struct mma8452_data *data, } } -static int mma8452_read_thresh(struct iio_dev *indio_dev, +static int mma8452_read_event_value(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, @@ -855,7 +855,7 @@ static int mma8452_read_thresh(struct iio_dev *indio_dev, } } -static int mma8452_write_thresh(struct iio_dev *indio_dev, +static int mma8452_write_event_value(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, @@ -1391,8 +1391,8 @@ static const struct iio_info mma8452_info = { .read_raw = &mma8452_read_raw, .write_raw = &mma8452_write_raw, .event_attrs = &mma8452_event_attribute_group, - .read_event_value = &mma8452_read_thresh, - .write_event_value = &mma8452_write_thresh, + .read_event_value = &mma8452_read_event_value, + .write_event_value = &mma8452_write_event_value, .read_event_config = &mma8452_read_event_config, .write_event_config = &mma8452_write_event_config, .debugfs_reg_access = &mma8452_reg_access_dbg,