Skip to content

Commit

Permalink
gpio: Fix pin's status display for pin with GPIOF_UNUSED function
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Patrick Delaunay <[email protected]>
  • Loading branch information
Patrice Chotard authored and trini committed Sep 15, 2022
1 parent d7124f0 commit a329208
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-uclass.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit a329208

Please sign in to comment.