console: Update coninfo to use sdev instead of dev

The 'dev' variable is generally used for driver model, so change
do_coninfo() to use sdev, to avoid confusion.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-08-22 04:07:54 -06:00
parent 8aa1e7c81e
commit 249bb45cb3

View File

@@ -11,34 +11,33 @@
#include <iomux.h>
#include <stdio_dev.h>
extern void _do_coninfo (void);
static int do_coninfo(struct cmd_tbl *cmd, int flag, int argc,
char *const argv[])
{
int l;
struct list_head *list = stdio_get_list();
struct list_head *pos;
struct stdio_dev *dev;
struct stdio_dev *sdev;
/* Scan for valid output and input devices */
puts("List of available devices\n");
list_for_each(pos, list) {
dev = list_entry(pos, struct stdio_dev, list);
sdev = list_entry(pos, struct stdio_dev, list);
printf("|-- %s (%s%s)\n",
dev->name,
(dev->flags & DEV_FLAGS_INPUT) ? "I" : "",
(dev->flags & DEV_FLAGS_OUTPUT) ? "O" : "");
sdev->name,
(sdev->flags & DEV_FLAGS_INPUT) ? "I" : "",
(sdev->flags & DEV_FLAGS_OUTPUT) ? "O" : "");
for (l = 0; l < MAX_FILES; l++) {
if (CONFIG_IS_ENABLED(CONSOLE_MUX)) {
if (iomux_match_device(console_devices[l],
cd_count[l], dev) >= 0)
cd_count[l], sdev) >= 0)
printf("| |-- %s\n", stdio_names[l]);
} else {
if (stdio_devices[l] == dev)
if (stdio_devices[l] == sdev)
printf("| |-- %s\n", stdio_names[l]);
}