* [PATCH AUTOSEL 5.10 05/21] tools: gpio: fix debounce_period_us output of lsgpio
[not found] <20230531134415.3384458-1-sashal@kernel.org>
@ 2023-05-31 13:43 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2023-05-31 13:43 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Milo Spadacini, Linus Walleij, Andy Shevchenko,
Bartosz Golaszewski, Sasha Levin, brgl, linux-gpio
From: Milo Spadacini <milo.spadacini@gmail.com>
[ Upstream commit eb4b8eca1bad98f4b8574558a74f041f9acb5a54 ]
Fix incorrect output that could occur when more attributes are used and
GPIO_V2_LINE_ATTR_ID_DEBOUNCE is not the first one.
Signed-off-by: Milo Spadacini <milo.spadacini@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/gpio/lsgpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
index 5a05a454d0c97..85a2aa292f5d5 100644
--- a/tools/gpio/lsgpio.c
+++ b/tools/gpio/lsgpio.c
@@ -90,7 +90,7 @@ static void print_attributes(struct gpio_v2_line_info *info)
for (i = 0; i < info->num_attrs; i++) {
if (info->attrs[i].id == GPIO_V2_LINE_ATTR_ID_DEBOUNCE)
fprintf(stdout, ", debounce_period=%dusec",
- info->attrs[0].debounce_period_us);
+ info->attrs[i].debounce_period_us);
}
}
--
2.39.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-31 13:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230531134415.3384458-1-sashal@kernel.org>
2023-05-31 13:43 ` [PATCH AUTOSEL 5.10 05/21] tools: gpio: fix debounce_period_us output of lsgpio Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).