[PATCH 10/12] loadb: use console_get_baudrate

Sascha Hauer s.hauer at pengutronix.de
Mon Jun 8 23:21:13 PDT 2015


No need to fiddle with device parameters anymore.

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

diff --git a/commands/loadb.c b/commands/loadb.c
index 66934c4..8294f39 100644
--- a/commands/loadb.c
+++ b/commands/loadb.c
@@ -635,7 +635,7 @@ static int do_load_serial_bin(int argc, char *argv[])
 		printf("%s:No console device with STDIN and STDOUT\n", argv[0]);
 		return -ENODEV;
 	}
-	current_baudrate = (int)simple_strtoul(dev_get_param(&cdev->class_dev, "baudrate"), NULL, 10);
+	current_baudrate = console_get_baudrate(cdev);
 
 	/* Load Defaults */
 	if (load_baudrate == 0)
-- 
2.1.4




More information about the barebox mailing list