From patchwork Mon Sep 25 10:07:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harinath Nampally X-Patchwork-Id: 9969567 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 79DA8603F2 for ; Mon, 25 Sep 2017 10:08:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69EFD28066 for ; Mon, 25 Sep 2017 10:08:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5CAAF28A58; Mon, 25 Sep 2017 10:08:37 +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 83B2528A78 for ; Mon, 25 Sep 2017 10:08:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933975AbdIYKH7 (ORCPT ); Mon, 25 Sep 2017 06:07:59 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:38176 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934055AbdIYKHy (ORCPT ); Mon, 25 Sep 2017 06:07:54 -0400 Received: by mail-oi0-f65.google.com with SMTP id s145so3439991oie.5; Mon, 25 Sep 2017 03:07:53 -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=FRBH5WejzEbWz+NkYu3hRBpFu/MEGUT2yuGkHAyWeFyBhHUHDTtAUNr15kLk4e1ivV 6UKrU4SkHycEc0eUdkAc6i6SEBxGH86toT0jyqF65WvnNP+UO9GmahrFx86N5dunAjDJ HIc5jocv9rXEz1k3lLTHIMUYCHhgcdnd+uDSnkgaU1Y+J7Y+49IMUVdeRPduLWjwHT8Z DoEOI97/7+0UXXCmRCJKLmnzEWsNkkM0Mch4C7e5B39/tfyGPyvSjjUQ5/A7Z9jiLKam fT/BEH0JFzhV5eokcecqjZsyckCK2IPMpWkwc03q2ivnxKdZTlh6YgKrCupKkwGJRo8J zNIQ== 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=mOzFWFU48XVBMo9BFXd2Jw7u8pRii7emRlpETIvpci6lS+vWqjQytxYH54BysP640O MvVBHsZh8dGZSjKDFem6hj1ZU+G7sGHJ21yZg+Tx9nhFfv4GmhQWGaxaVIFOC5Egu1HL MhmmzqyaoSqFb6aWcbQ9JgwH+tGrJUdPwFjOoBXJHJKjJR5Q2wvTKRQDvqW767n0XoXM t3DKlsTfAJVwAV2A8tpPMYh0g53PEPHNs+067HsBEhsQyEtaCJjmzQ4tjin2R8qoF/U8 jZsVMeACJZhdLBW6sTYA5k9fziyHyfxdGPRGKi8mA9kD0mtwDdKEB0bSdGx6KCYfy5nM C6Mw== X-Gm-Message-State: AHPjjUjzzTtf620DvxnzoBv3mYCuG/Cyltw3cBPq1Vt+RBRGHOBz3aX8 wZFWOzxBec1ObWl5rOSpFOPJtj4D X-Google-Smtp-Source: AOwi7QBiCE/kZ89d8GMEYaO1LzvfLBAPxNqtlkQuu+vX/GBkr8d3YronyyXQi5eTmQF9FU8iCMD3jw== X-Received: by 10.202.234.5 with SMTP id i5mr8654700oih.76.1506334073535; Mon, 25 Sep 2017 03:07:53 -0700 (PDT) Received: from hary-Aspire-X3400G.Belkin ([97.70.80.173]) by smtp.googlemail.com with ESMTPSA id x206sm6998815oig.55.2017.09.25.03.07.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Sep 2017 03:07:52 -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 3/3] iio: accel: mma8452: Rename read/write event value callbacks to generic function name. Date: Mon, 25 Sep 2017 06:07:44 -0400 Message-Id: <1506334065-2891-4-git-send-email-harinath922@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506334065-2891-1-git-send-email-harinath922@gmail.com> References: <1506334065-2891-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,