[PATCH 07/12] loadxy: use console_get_baudrate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No need to fiddle with device parameters anymore.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux