summaryrefslogtreecommitdiffstats
path: root/commands/loadxy.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-06-08 14:27:28 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-06-09 09:22:14 +0200
commitd2a53a56b9629b90fce73d5e28e4fc3f57fa9acb (patch)
tree075076b96b671b42d690850355b11c9ea5d8785c /commands/loadxy.c
parentc6fe3cd6bec591c6f49af2a95ca8b81226c8b31a (diff)
downloadbarebox-d2a53a56b9629b90fce73d5e28e4fc3f57fa9acb.tar.gz
loadxy: use console_get_baudrate
No need to fiddle with device parameters anymore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/loadxy.c')
-rw-r--r--commands/loadxy.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/commands/loadxy.c b/commands/loadxy.c
index 62b3956..b475edf 100644
--- a/commands/loadxy.c
+++ b/commands/loadxy.c
@@ -43,10 +43,8 @@
static int console_change_speed(struct console_device *cdev, int baudrate)
{
int current_baudrate;
- const char *bstr;
- bstr = dev_get_param(&cdev->class_dev, "baudrate");
- current_baudrate = bstr ? (int)simple_strtoul(bstr, NULL, 10) : 0;
+ current_baudrate = console_get_baudrate(cdev);
if (baudrate && baudrate != current_baudrate) {
printf("## Switch baudrate from %d to %d bps and press ENTER ...\n",
current_baudrate, baudrate);