mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-16 18:26:42 +00:00
tools: gpio: fix debounce_period_us output of lsgpio
[ 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>
This commit is contained in:
parent
cc1444a363
commit
79a0a3695e
@ -94,7 +94,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user