From: Kent Gibson <warthog618@gmail.com>
To: linux-gpio@vger.kernel.org, brgl@bgdev.pl
Cc: Kent Gibson <warthog618@gmail.com>
Subject: [libgpiod v2][PATCH 4/6] line-config: rename num_values to num_lines
Date: Fri, 11 Mar 2022 15:39:24 +0800 [thread overview]
Message-ID: <20220311073926.78636-5-warthog618@gmail.com> (raw)
In-Reply-To: <20220311073926.78636-1-warthog618@gmail.com>
Other functions, such as gpiod_line_request_set_values_subset()
use num_lines to indicate the size of the set, so change
num_values to num_lines in gpiod_line_config_set_output_values()
to be consistent.
Signed-off-by: Kent Gibson <warthog618@gmail.com>
---
include/gpiod.h | 4 ++--
lib/line-config.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/gpiod.h b/include/gpiod.h
index 8fb70ee..3f4bedd 100644
--- a/include/gpiod.h
+++ b/include/gpiod.h
@@ -935,13 +935,13 @@ gpiod_line_config_set_output_value_override(struct gpiod_line_config *config,
/**
* @brief Override the output values for multiple offsets.
* @param config Line config object.
- * @param num_values Number of offsets for which to override values.
+ * @param num_lines Number of lines for which to override values.
* @param offsets Array of line offsets to override values for.
* @param values Array of output values associated with the offsets passed in
* the previous argument.
*/
void gpiod_line_config_set_output_values(struct gpiod_line_config *config,
- size_t num_values,
+ size_t num_lines,
const unsigned int *offsets,
const int *values);
diff --git a/lib/line-config.c b/lib/line-config.c
index 31fc1b3..0361a32 100644
--- a/lib/line-config.c
+++ b/lib/line-config.c
@@ -671,13 +671,13 @@ gpiod_line_config_set_output_value_override(struct gpiod_line_config *config,
GPIOD_API void
gpiod_line_config_set_output_values(struct gpiod_line_config *config,
- size_t num_values,
+ size_t num_lines,
const unsigned int *offsets,
const int *values)
{
size_t i;
- for (i = 0; i < num_values; i++)
+ for (i = 0; i < num_lines; i++)
gpiod_line_config_set_output_value_override(config,
offsets[i],
values[i]);
--
2.35.1
next prev parent reply other threads:[~2022-03-11 7:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 7:39 [libgpiod v2][PATCH 0/6] documentation and other minor tweaks Kent Gibson
2022-03-11 7:39 ` [libgpiod v2][PATCH 1/6] treewide: use size_t for loop variable where limit is size_t Kent Gibson
2022-03-11 7:39 ` [libgpiod v2][PATCH 2/6] API: rename gpiod_request_config_get_num_offsets to gpiod_request_config_get_num_lines to match line_request pattern Kent Gibson
2022-03-15 10:52 ` Bartosz Golaszewski
2022-03-15 11:23 ` Kent Gibson
2022-03-15 11:39 ` Bartosz Golaszewski
2022-03-15 11:59 ` Kent Gibson
2022-03-15 13:43 ` Bartosz Golaszewski
2022-03-15 14:51 ` Kent Gibson
2022-03-11 7:39 ` [libgpiod v2][PATCH 3/6] line-config: rename off to idx Kent Gibson
2022-03-11 7:39 ` Kent Gibson [this message]
2022-03-15 10:58 ` [libgpiod v2][PATCH 4/6] line-config: rename num_values to num_lines Bartosz Golaszewski
2022-03-11 7:39 ` [libgpiod v2][PATCH 5/6] line-request: rename wait and read functions Kent Gibson
2022-03-11 7:39 ` [libgpiod v2][PATCH 6/6] doc: API documentation tweaks Kent Gibson
2022-03-15 11:20 ` Bartosz Golaszewski
2022-03-14 8:31 ` [libgpiod v2][PATCH 0/6] documentation and other minor tweaks Bartosz Golaszewski
2022-03-15 1:33 ` Kent Gibson
2022-03-15 11:25 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220311073926.78636-5-warthog618@gmail.com \
--to=warthog618@gmail.com \
--cc=brgl@bgdev.pl \
--cc=linux-gpio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.