summaryrefslogtreecommitdiffstats
path: root/common/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/console.c')
-rw-r--r--common/console.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/console.c b/common/console.c
index 3f3a30fc82..d04aae58f9 100644
--- a/common/console.c
+++ b/common/console.c
@@ -323,6 +323,9 @@ int console_register(struct console_device *newcdev)
dev->parent = newcdev->dev;
platform_device_register(dev);
+ if (!newcdev->devname)
+ newcdev->devname = xstrdup(dev_name(dev));
+
newcdev->open_count = 0;
/*