summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-08-07 06:14:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-08-07 06:14:18 +0200
commit90118343e46fecac78b6351ce25bb610b15fc077 (patch)
tree06f596eedd8fa95c96320a8e185c86a1f33cf5fa /common
parent3522192d6da091dfae912a28ed9377913b596299 (diff)
parentc053e2414c2a6c2de81cbbc4e49933042613191b (diff)
downloadbarebox-90118343e46fecac78b6351ce25bb610b15fc077.tar.gz
barebox-90118343e46fecac78b6351ce25bb610b15fc077.tar.xz
Merge branch 'for-next/console'
Diffstat (limited to 'common')
-rw-r--r--common/console.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/common/console.c b/common/console.c
index aa9e3ce0f5..f9823661f0 100644
--- a/common/console.c
+++ b/common/console.c
@@ -170,8 +170,14 @@ int console_register(struct console_device *newcdev)
if (initialized == CONSOLE_UNINITIALIZED)
console_init_early();
- dev->id = DEVICE_ID_DYNAMIC;
- strcpy(dev->name, "cs");
+ if (newcdev->devname) {
+ dev->id = DEVICE_ID_SINGLE;
+ strcpy(dev->name, newcdev->devname);
+ } else {
+ dev->id = DEVICE_ID_DYNAMIC;
+ strcpy(dev->name, "cs");
+ }
+
if (newcdev->dev)
dev->parent = newcdev->dev;
platform_device_register(dev);