[libgpiod v2][PATCH 4/6] line-config: rename num_values to num_lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux