Patch "tools: gpio: fix debounce_period_us output of lsgpio" has been added to the 6.3-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    tools: gpio: fix debounce_period_us output of lsgpio

to the 6.3-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tools-gpio-fix-debounce_period_us-output-of-lsgpio.patch
and it can be found in the queue-6.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5b320a07780e4c27128e9981a27ebebc61f11fd6
Author: Milo Spadacini <milo.spadacini@xxxxxxxxx>
Date:   Mon May 8 15:18:48 2023 +0200

    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@xxxxxxxxx>
    Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
index c61d061247e17..52a0be45410c9 100644
--- a/tools/gpio/lsgpio.c
+++ b/tools/gpio/lsgpio.c
@@ -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);
 	}
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux