mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] console: Fix initial value of baudrate parameter
@ 2016-05-26  7:15 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2016-05-26  7:15 UTC (permalink / raw)
  To: Barebox List

The 'baudrate' parameter has the wrong value initially, it has to
be set to CONFIG_BAUDRATE. Otherwise a devinfo shows a baudrate of 0
until actively changed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/console.c b/common/console.c
index a67f169..74ccfcf 100644
--- a/common/console.c
+++ b/common/console.c
@@ -256,7 +256,7 @@ int console_register(struct console_device *newcdev)
 		ret = newcdev->setbrg(newcdev, CONFIG_BAUDRATE);
 		if (ret)
 			return ret;
-		newcdev->baudrate = CONFIG_BAUDRATE;
+		newcdev->baudrate_param = newcdev->baudrate = CONFIG_BAUDRATE;
 		dev_add_param_int(dev, "baudrate", console_baudrate_set,
 			NULL, &newcdev->baudrate_param, "%u", newcdev);
 	}
-- 
2.8.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-26  7:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-26  7:15 [PATCH] console: Fix initial value of baudrate parameter Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox