[Concept,v2,10/16] console: Update coninfo to use sdev instead of dev

Message ID 20250825162727.3185381-11-sjg@u-boot.org
State New
Headers
Series console: Refactor in preparation for the pager |

Commit Message

Simon Glass Aug. 25, 2025, 4:27 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

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>
---

(no changes since v1)

 cmd/console.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
  

Patch

diff --git a/cmd/console.c b/cmd/console.c
index a8133ee3fa3..cb0c041d947 100644
--- a/cmd/console.c
+++ b/cmd/console.c
@@ -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]);
 			}