path: root/drivers/serial
diff options
authorAleksander Morgado <>2017-05-31 18:12:40 +0200
committerSascha Hauer <>2017-06-01 09:42:48 +0200
commita8de37dbef75665b6bdd98e9ce54f9fb20484785 (patch)
tree6bcd4797317fa8ddc77ffc3a67ce3ccaebda4cc6 /drivers/serial
parent44ae52f30ff074be01214a3a77495a1c248ac02a (diff)
sandbox: fix registering multiple consoles
Consoles need to be registered with the "console" device name so that they are probed by the correct driver. The barebox_register_console() was already forcing this as it was overwriting the name that was being passed as argument, but it was failing to provide a unique id for each new console, so the underlying register_device() would just return an error when wanting to re-register a device with device name "console" and id 0. We remove the unused name parameter from barebox_register_console() as it is really nowhere used, and also specify DEVICE_ID_DYNAMIC as id, so that a new unique device id is given to each newly registered console device. Signed-off-by: Aleksander Morgado <> Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'drivers/serial')
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/serial/linux_console.c b/drivers/serial/linux_console.c
index 760b3b8..0d5da9d 100644
--- a/drivers/serial/linux_console.c
+++ b/drivers/serial/linux_console.c
@@ -73,6 +73,9 @@ static int linux_console_probe(struct device_d *dev)
+ pr_info("%s: registered as %s%d\n", dev->name, cdev->,
+ cdev->;
return 0;