projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09d8f07
)
IOMUX: Switch to use stdio_file_to_flags()
author
Andy Shevchenko
<andriy.shevchenko@linux.intel.com>
Thu, 11 Feb 2021 15:09:40 +0000
(17:09 +0200)
committer
Tom Rini
<trini@konsulko.com>
Tue, 16 Feb 2021 16:16:08 +0000
(11:16 -0500)
Deduplicate code by replacing with stdio_file_to_flags() helper.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
common/iomux.c
patch
|
blob
|
history
diff --git
a/common/iomux.c
b/common/iomux.c
index
15bf533
..
5d02756
100644
(file)
--- a/
common/iomux.c
+++ b/
common/iomux.c
@@
-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);