summaryrefslogtreecommitdiffstats
path: root/common/console_common.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-10-07 08:02:14 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-10-07 08:02:14 +0200
commitebf9022f2eee564fc4b0e4b37a8267319923d808 (patch)
tree407715e96a34f57b194198c24099cd7b627ae714 /common/console_common.c
parenta293dc2753433f8052f9471b2d0cc19f01c50739 (diff)
parent7359e2852249758f6fb12dae9a0d57a197b7a769 (diff)
downloadbarebox-ebf9022f2eee564fc4b0e4b37a8267319923d808.tar.gz
Merge branch 'for-next/rs485'
Conflicts: common/console_common.c
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 5d2ccdb..cc184df 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
*