[PATCH 07/12] loadxy: use console_get_baudrate

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


No need to fiddle with device parameters anymore.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 commands/loadxy.c | 4 +---
 1 file changed, 1 insertion(+), 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);
-- 
2.1.4




More information about the barebox mailing list