public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] serial: remove calls to serial_assign()
@ 2012-10-25 23:30 Allen Martin
  2012-10-25 23:39 ` Joe Hershberger
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Allen Martin @ 2012-10-25 23:30 UTC (permalink / raw)
  To: u-boot

Remove calls to serial_assign() that are failing now that it returns a
proper error code.  This calls were not actually doing anything
because they passed the name of a stdio_dev when a serial_device name
is exptectd.

Signed-off-by: Allen Martin <amartin@nvidia.com>
---
 common/cmd_nvedit.c |    3 ---
 common/iomux.c      |   10 ----------
 2 files changed, 13 deletions(-)

diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 1f9c674..68c38f4 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -238,9 +238,6 @@ int env_check_apply(const char *name, const char *oldval,
 		/* Try assigning specified device */
 		if (console_assign(console, newval) < 0)
 			return 1;
-
-		if (serial_assign(newval) < 0)
-			return 1;
 #endif /* CONFIG_CONSOLE_MUX */
 	}
 
diff --git a/common/iomux.c b/common/iomux.c
index dbc2312..6a75704 100644
--- a/common/iomux.c
+++ b/common/iomux.c
@@ -135,16 +135,6 @@ int iomux_doenv(const int console, const char *arg)
 		 */
 		if (console_assign(console, start[j]) < 0)
 			continue;
-		/*
-		 * This was taken from common/cmd_nvedit.c.
-		 * This will never work because serial_assign() returns
-		 * 1 upon error, not -1.
-		 * This would almost always return an error anyway because
-		 * serial_assign() expects the name of a serial device, like
-		 * serial_smc, but the user generally only wants to set serial.
-		 */
-		if (serial_assign(start[j]) < 0)
-			continue;
 		cons_set[cs_idx++] = dev;
 	}
 	free(console_args);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-10-26 22:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-25 23:30 [U-Boot] [PATCH] serial: remove calls to serial_assign() Allen Martin
2012-10-25 23:39 ` Joe Hershberger
2012-10-26  7:10   ` Marek Vasut
2012-10-26 14:53     ` Tom Rini
2012-10-26 15:50       ` Simon Glass
2012-10-26 16:23         ` Stephen Warren
2012-10-26 16:35           ` Simon Glass
2012-10-26 16:35 ` Tom Rini
2012-10-26 22:12 ` Tom Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox