summaryrefslogtreecommitdiffstats
path: root/common/console_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/console_common.c')
-rw-r--r--common/console_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/console_common.c b/common/console_common.c
index 00e020bd35..0131a1190a 100644
--- a/common/console_common.c
+++ b/common/console_common.c
@@ -301,12 +301,13 @@ EXPORT_SYMBOL(console_get_by_name);
struct console_device *console_get_first_active(void)
{
struct console_device *cdev;
+ const unsigned char active = CONSOLE_STDIN | CONSOLE_STDOUT;
/*
* Assumption to have BOTH CONSOLE_STDIN AND STDOUT in the
* same output console
*/
for_each_console(cdev) {
- if ((cdev->f_active & (CONSOLE_STDIN | CONSOLE_STDOUT)))
+ if ((cdev->f_active & active) == active)
return cdev;
}