[PATCH] console: fix new console registration

Steffen Trumtrar s.trumtrar at pengutronix.de
Sun Jun 9 15:43:13 EDT 2013

The console_register-function gets the baudrate from a kconfig parameter and
sets the console accordingly, if a setbrg function is registered.
Add the missing call to setbrg on the newly registered console to actually
use the baudrate setting.

Signed-off-by: Steffen Trumtrar <s.trumtrar at pengutronix.de>
 common/console.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/console.c b/common/console.c
index a0a06f6..abf5322 100644
--- a/common/console.c
+++ b/common/console.c
@@ -147,6 +147,7 @@ int console_register(struct console_device *newcdev)
 		newcdev->baudrate = CONFIG_BAUDRATE;
 		dev_add_param_int(dev, "baudrate", console_baudrate_set,
 			NULL, &newcdev->baudrate, "%u", newcdev);
+		newcdev->setbrg(newcdev, newcdev->baudrate);
 	dev_add_param(dev, "active", console_std_set, NULL, 0);

More information about the barebox mailing list