diff options
author | Patrice Chotard <patrice.chotard@foss.st.com> | 2022-08-30 14:09:12 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-15 09:55:30 -0400 |
commit | a32920897a205c53717d864ae6c44fb6703094c9 (patch) | |
tree | 8aaf680efb29eac13cc3a7a9a8a7df3f10abdf75 /drivers/gpio/gpio-uclass.c | |
parent | d7124f0ba42263e6a24a829ca523861650bfec65 (diff) |
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 <patrice.chotard@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Diffstat (limited to 'drivers/gpio/gpio-uclass.c')
-rw-r--r-- | drivers/gpio/gpio-uclass.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |