提交 658d6c58 编写于 作者: A Andy Shevchenko 提交者: Tom Rini

IOMUX: Switch to use stdio_file_to_flags()

Deduplicate code by replacing with stdio_file_to_flags() helper.
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
上级 09d8f077
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册