From a8de37dbef75665b6bdd98e9ce54f9fb20484785 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 31 May 2017 18:12:40 +0200 Subject: 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 --- drivers/serial/linux_console.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/serial') diff --git a/drivers/serial/linux_console.c b/drivers/serial/linux_console.c index 760b3b81fe..0d5da9d1b0 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) console_register(cdev); + pr_info("%s: registered as %s%d\n", dev->name, cdev->class_dev.name, + cdev->class_dev.id); + return 0; } -- cgit v1.2.3