From patchwork Mon Sep 25 10:40:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harinath Nampally X-Patchwork-Id: 9969645 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 9BCA760365 for ; Mon, 25 Sep 2017 10:40:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90A9228BA0 for ; Mon, 25 Sep 2017 10:40:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 846BA28BA1; Mon, 25 Sep 2017 10:40:39 +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 321F228B99 for ; Mon, 25 Sep 2017 10:40:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933162AbdIYKk1 (ORCPT ); Mon, 25 Sep 2017 06:40:27 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:34720 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934575AbdIYKkQ (ORCPT ); Mon, 25 Sep 2017 06:40:16 -0400 Received: by mail-oi0-f67.google.com with SMTP id v188so3485822oia.1; Mon, 25 Sep 2017 03:40:16 -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=F01BnGyEnkarq2leCLTjW2vkD2Qhx59Zbvn9Penuhn/oxwjCm8+8RZMWdB1wq8Dz5w Y9YQzzftnG5PQCt37brbasqcnVTKRz8R8pcuzdNP/JrtkEwDXkZYE6yQG6Q08ZdaCDSz zgJEAAjw90BEs4oc2w8krb9i8dax946VasIy0wcSy8QbVHxr1p1KhojsAXfsNjhmTHN1 DPVtqzWCKOF06zAP08MEolSFXw9wiJR3ZKMzq5aqN++n4SmPes0sLSDoItLyzmdTl4Zy E0j3bKh2MkeEqocobGjqE+LriDTuOVlG+emDFKkb+AMuvwRD7biKCvTr8YCa5BPx6Xef t+/w== 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=bfheiHhlu8s13Xvh0Cc6BoOVKoAFjiEGlL6Fa7cUYJG72lybP4XXrhvotAiR3P0BGf 0rb3L3/yVekhdkP3V7/ktHAPRWmBnIU3Flun/VieT6IyWsyJ0efBfy+3mpZDMcVxvsbj bHLA6PROVHPupi7e5iIIdYarYtQWsHKH9529sd+Yk6bhtsJebfn8n02t7jnFDehPliZG zdqOnBswjtBdm0qSIddBN6nwAfFpbC9Z+HXlGXf4Ob4wHlN/gATgPa2iv985K7phgga6 JMQS2hAMJ60g1Y4cwOR4XY6xyUnH+rZuoYKx65EBS798+OXpl/Pom6dKpfyMnzT4fj9E pZTQ== X-Gm-Message-State: AHPjjUjgVidx6dyld6xTI9i4gVimDKjwG01fa86lXjzk5VXxqoYdeeZ9 kpfqmusWSsYaQJ6uDGHMtsA= X-Google-Smtp-Source: AOwi7QBxolbeSKDnPJtK5Y5Wmz45Go2krIvzF4bk03UrXs3GNGw1mYEWdZmT7L2efj6rvuCYAFV2ow== X-Received: by 10.157.87.26 with SMTP id p26mr47089oth.94.1506336015773; Mon, 25 Sep 2017 03:40:15 -0700 (PDT) Received: from hary-Aspire-X3400G.Belkin ([97.70.80.173]) by smtp.googlemail.com with ESMTPSA id l17sm114750ote.74.2017.09.25.03.40.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Sep 2017 03:40:15 -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 v3 3/3] iio: accel: mma8452: Rename read/write event value callbacks to generic function name. Date: Mon, 25 Sep 2017 06:40:08 -0400 Message-Id: <1506336008-4480-4-git-send-email-harinath922@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506336008-4480-1-git-send-email-harinath922@gmail.com> References: <1506336008-4480-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 Acked-by: Martin Kepplinger --- 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,