From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z2Cuw-0004sc-2j for barebox@lists.infradead.org; Tue, 09 Jun 2015 06:21:47 +0000 From: Sascha Hauer Date: Tue, 9 Jun 2015 08:21:10 +0200 Message-Id: <1433830875-31119-8-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1433830875-31119-1-git-send-email-s.hauer@pengutronix.de> References: <1433830875-31119-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 07/12] loadxy: use console_get_baudrate To: Barebox List No need to fiddle with device parameters anymore. Signed-off-by: Sascha Hauer --- 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@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox