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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/console_common.c b/common/console_common.c
index 41a6929dba..1e362ab4e4 100644
--- a/common/console_common.c
+++ b/common/console_common.c
@@ -260,6 +260,19 @@ struct console_device *console_get_by_dev(struct device_d *dev)
}
EXPORT_SYMBOL(console_get_by_dev);
+struct console_device *console_get_by_name(const char *name)
+{
+ struct console_device *cdev;
+
+ for_each_console(cdev) {
+ if (!strcmp(cdev->devname, name))
+ return cdev;
+ }
+
+ return NULL;
+}
+EXPORT_SYMBOL(console_get_by_name);
+
/*
* @brief returns current used console device
*