mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
IOMUX: Switch to use stdio_file_to_flags()
Deduplicate code by replacing with stdio_file_to_flags() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
committed by
Tom Rini
parent
09d8f07762
commit
658d6c5836
@@ -75,15 +75,8 @@ int iomux_doenv(const int console, const char *arg)
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (console) {
|
||||
case stdin:
|
||||
io_flag = DEV_FLAGS_INPUT;
|
||||
break;
|
||||
case stdout:
|
||||
case stderr:
|
||||
io_flag = DEV_FLAGS_OUTPUT;
|
||||
break;
|
||||
default:
|
||||
io_flag = stdio_file_to_flags(console);
|
||||
if (io_flag < 0) {
|
||||
free(start);
|
||||
free(console_args);
|
||||
free(cons_set);
|
||||
|
Reference in New Issue
Block a user