console: Set console device counter in console_devices_set()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 11 Feb 2021 15:09:38 +0000 (17:09 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 16 Feb 2021 16:16:07 +0000 (11:16 -0500)
console_devices_set() missed the console device counter to be set correctly.

Fixes: 45375adc9799 ("console: add function console_devices_set")
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
common/console.c

index b1afb65..9064a6c 100644 (file)
@@ -236,6 +236,7 @@ int cd_count[MAX_FILES];
 static void __maybe_unused console_devices_set(int file, struct stdio_dev *dev)
 {
        console_devices[file][0] = dev;
+       cd_count[file] = 1;
 }
 
 /**