From d2a53a56b9629b90fce73d5e28e4fc3f57fa9acb Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 8 Jun 2015 14:27:28 +0200 Subject: loadxy: use console_get_baudrate No need to fiddle with device parameters anymore. Signed-off-by: Sascha Hauer --- commands/loadxy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'commands/loadxy.c') diff --git a/commands/loadxy.c b/commands/loadxy.c index 62b395626d..b475edf3ef 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); -- cgit v1.2.3