summaryrefslogtreecommitdiffstats
path: root/common/console.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-05-26 09:13:07 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-05-26 09:13:09 +0200
commit4178dda706b0eb153ec15eb1ca202af76dc20010 (patch)
tree40845614612b5f700abf60211620ecaa1e30380a /common/console.c
parent5376121774cd5162d6d73ed1d59f41d2b9b1ec61 (diff)
downloadbarebox-4178dda706b0eb153ec15eb1ca202af76dc20010.tar.gz
console: Fix initial value of baudrate parameter
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>
Diffstat (limited to 'common/console.c')
-rw-r--r--common/console.c2
1 files changed, 1 insertions, 1 deletions
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);
}