mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 07:16:04 +09: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:
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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user