summaryrefslogtreecommitdiffstats
path: root/arch/ppc
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-10-03 09:21:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-10-06 13:19:46 +0200
commit6a5121f74894ed2d3514b59bd287d126eb7f1488 (patch)
tree8259be40e6cad36b274aeb3fb9768c71a6c8714a /arch/ppc
parent651a23a69e598658e05e9e55d390db3a3f2a738a (diff)
downloadbarebox-6a5121f74894ed2d3514b59bd287d126eb7f1488.tar.gz
barebox-6a5121f74894ed2d3514b59bd287d126eb7f1488.tar.xz
console: factorise function to get the first enabled console
rename it to console_get_first_active Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc')
-rw-r--r--arch/ppc/mach-mpc85xx/fdt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/ppc/mach-mpc85xx/fdt.c b/arch/ppc/mach-mpc85xx/fdt.c
index 4feae441e6..65de6f1104 100644
--- a/arch/ppc/mach-mpc85xx/fdt.c
+++ b/arch/ppc/mach-mpc85xx/fdt.c
@@ -70,9 +70,7 @@ static int fdt_stdout_setup(struct device_node *blob)
goto error;
}
- for_each_console(cdev)
- if ((cdev->f_active & (CONSOLE_STDIN | CONSOLE_STDOUT)))
- break;
+ cdev = console_get_first_active();
if (cdev)
sprintf(sername, "serial%d", cdev->dev->id);
else