diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-22 08:07:10 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-07-22 08:07:10 +0200 |
commit | 5ec16bea1a5425f944e6b909edda538385b238ca (patch) | |
tree | 2ec80d12ae2ba8d1fb829415187bb11961a9b145 /common | |
parent | 4c05bb1445f87756c0f1f8c00ef87fbe96d737f2 (diff) | |
parent | c053e2414c2a6c2de81cbbc4e49933042613191b (diff) | |
download | barebox-5ec16bea1a5425f944e6b909edda538385b238ca.tar.gz barebox-5ec16bea1a5425f944e6b909edda538385b238ca.tar.xz |
Merge branch 'for-next/console' into for-next/usb-gadget
Diffstat (limited to 'common')
-rw-r--r-- | common/console.c | 10 |
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); |