[PATCH] tools: gpio: fix debounce_period_us output of lsgpio

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

 



Fix wrong output that could occurs when more attributes are used and
 GPIO_V2_LINE_ATTR_ID_DEBOUNCE is not the first one.
---
 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 c61d061247e1..52a0be45410c 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);
        }
 }

--
2.34.1

[https://www.comelitgroup.com/firma/banner.jpg]<https://www.comelitgroup.com/it-it/cctv-advance-la-nuova-gamma-di-videosorveglianza-professionale-di-comelit>

NORME DI ACCESSO E DI COMPORTAMENTO PER ESTERNI<https://www.comelitgroup.com/it-it/norme-accesso-comportamento-esterni>

AVVISO DI CONFIDENZIALITÀ E PRIVACY
Questo messaggio ed i suoi eventuali allegati possono contenere informazioni confidenziali, di proprietà, legalmente protette. È destinato all'utilizzo esclusivo del destinatario sopra indicato; la natura privata e la confidenzialità non sono modificati da eventuali errori di trasmissione, pur avendo il mittente assunto tutte le misure di sicurezza idonee e preventive per evitarli. Il trattamento dei dati ivi contenuti, e quelli che verranno forniti in risposta, è realizzato in conformità alla normativa sulla privacy Reg 679/2016, potrete prendere visione della informativa anche visitando il sito www.comelitgroup.com ovvero sulle app Comelit. Rispondendo alla presente mail dichiarate di aver preso visione della richiamata informativa e di aver prestato il consenso al trattamento dei dati personali. Se il messaggio non è a lei destinato, non deve utilizzarlo, diffonderlo, copiarlo con qualunque mezzo, o intraprendere azioni basandosi su di esso. Se ha ricevuto questo messaggio per errore, la preghiamo di volerlo distruggere (unitamente ad eventuali copie dello stesso e suoi allegati) e di volerci cortesemente informare del fatto scrivendo al mittente.
CONFIDENTIALITY NOTICE AND PRIVACY
This message and its attachments (if any) may contain confidential, proprietary or legally privileged information and it is intended only for the use of the addressee named above. No confidentiality or privilege is waived or lost by any erroneous transmission, despite having taken all the security and preventative measures to avoid it. The processing of personal data contained therein, and those that will be provided in response, is made in compliance with the privacy regulation Reg 679/2016, you can also read the information by visiting www.comelitgroup.com or on Comelit apps. Responding to this email, you declare that you have read the aforementioned information and have given consent to the processing of personal data If you are not the intended recipient of this message, you are hereby notified that you must not use, disseminate, copy it in any form or take any action in reliance on it. If you have received this message in error, please, delete it (and any copies of it and attachment) and kindly inform the sender.




[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