tools: gpio: fix debounce_period_us output of lsgpio
PATCH v3 1/1 tools: gpio: fix debounce_period_us output of lsgpio
Fix incorrect output that could occur when more attributes are used and GPIO_V2_LINE_ATTR_ID_DEBOUNCE is not the first one.
---
V2 -> V3 add signature
V1 -> V2 fix commit syntax
--- tools/gpio/lsgpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/gpio/lsgpio.c +1 -1
@@ -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); } }
Signature · 1 line
2.34.1
Quoted 4 lines · Milo Spadacini
Fix incorrect output that could occur when more attributes are used and
GPIO_V2_LINE_ATTR_ID_DEBOUNCEis not the first one.Signed-off-by Milo Spadacini <[email protected]>
Thanks Milo!
Yours,
Linus Walleij
Andy Shevchenko
Reviewed-byQuoted 7 lines · Linus Walleij
Quoted 4 lines · Milo Spadacini
Fix incorrect output that could occur when more attributes are used and
GPIO_V2_LINE_ATTR_ID_DEBOUNCEis not the first one.Signed-off-by Milo Spadacini <[email protected]>
I'm not sure if we need a Fixes tag, but anyway LGTM as well:
Quoted 2 lines
Thanks Milo!
Reviewed-by Linus Walleij <[email protected]>
Signature · 2 lines
With Best Regards, Andy Shevchenko
Bartosz Golaszewski
AppliedQuoted 26 lines · Milo Spadacini
Fix incorrect output that could occur when more attributes are used and
GPIO_V2_LINE_ATTR_ID_DEBOUNCEis not the first one.Signed-off-by Milo Spadacini <[email protected]>---
V2 -> V3 add signature
V1 -> V2 fix commit syntax--- tools/gpio/lsgpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/gpio/lsgpio.c +1
-2@@ -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); } } --
Quoted 2 lines
2.34.1
Applied, thanks!
Bart