From: Patrice Chotard Date: Tue, 30 Aug 2022 12:09:12 +0000 (+0200) Subject: gpio: Fix pin's status display for pin with GPIOF_UNUSED function X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=a32920897a205c53717d864ae6c44fb6703094c9;p=u-boot.git gpio: Fix pin's status display for pin with GPIOF_UNUSED function Even pin with GPIOF_UNUSED function can have a label. The criteria to add or not a space character is linked to label not to the used/unused status. Signed-off-by: Patrice Chotard Reviewed-by: Simon Glass Reviewed-by: Patrick Delaunay --- diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c index d60e46159a..a00880e446 100644 --- a/drivers/gpio/gpio-uclass.c +++ b/drivers/gpio/gpio-uclass.c @@ -916,7 +916,7 @@ int gpio_get_status(struct udevice *dev, int offset, char *buf, int buffsize) snprintf(str + len, buffsize - len, ": %d [%c]%s%s", ret, used ? 'x' : ' ', - used ? " " : "", + label ? " " : "", label ? label : ""); break; }