diff options
Diffstat (limited to 'common/console_common.c')
-rw-r--r-- | common/console_common.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/console_common.c b/common/console_common.c index 5d2ccdb6e7..cc184dfaef 100644 --- a/common/console_common.c +++ b/common/console_common.c @@ -169,6 +169,19 @@ int fputc(int fd, char c) } EXPORT_SYMBOL(fputc); +struct console_device *console_get_by_dev(struct device_d *dev) +{ + struct console_device *cdev; + + for_each_console(cdev) { + if (cdev->dev == dev) + return cdev; + } + + return NULL; +} +EXPORT_SYMBOL(console_get_by_dev); + /* * @brief returns current used console device * |