serial: remove calls to serial_assign()
authorAllen Martin <amartin@nvidia.com>
Thu, 25 Oct 2012 13:30:14 +0000 (13:30 +0000)
committerTom Warren <twarren@nvidia.com>
Mon, 29 Oct 2012 16:07:06 +0000 (09:07 -0700)
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>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
common/cmd_nvedit.c
common/iomux.c

index 1f9c674260233d6944dd4419596156cd750b2027..68c38f4e5cc082c7d5bf228023dba9136ab30847 100644 (file)
@@ -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 */
        }
 
index dbc231250c3f7ad641ed179cb66e0ffabf61f6db..6a757041f6af98a9052aa90313260a8d0ae6c5ea 100644 (file)
@@ -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);