diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-06-11 15:33:49 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-07-21 16:41:47 +0200 |
commit | 02ba8a0542f119e02e63a3b4cd6ae5abfd8331f3 (patch) | |
tree | c358a8c1f4d1cc5db91d898e6f409f55b22f4127 /common | |
parent | 2f8df2a003a22e8b7397e51ac5f1796db920d579 (diff) | |
download | barebox-02ba8a0542f119e02e63a3b4cd6ae5abfd8331f3.tar.gz barebox-02ba8a0542f119e02e63a3b4cd6ae5abfd8331f3.tar.xz |
get rid of device ids
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/console.c | 6 | ||||
-rw-r--r-- | common/env.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/common/console.c b/common/console.c index c97a4f41e5..5036c26e1a 100644 --- a/common/console.c +++ b/common/console.c @@ -120,10 +120,14 @@ postcore_initcall(getc_buffer_flush); int console_register(struct console_device *newcdev) { - struct device_d *dev = newcdev->dev; + struct device_d *dev = &newcdev->class_dev; int first = 0; char ch; + strcpy(dev->name, "cs"); + dev->type_data = newcdev->dev->type_data; + register_device(dev); + if (newcdev->setbrg) { newcdev->baudrate_param.set = console_baudrate_set; newcdev->baudrate_param.name = "baudrate"; diff --git a/common/env.c b/common/env.c index 04ca275d44..edaf388956 100644 --- a/common/env.c +++ b/common/env.c @@ -142,7 +142,7 @@ const char *getenv (const char *name) char *par = strchr(devstr, '.'); struct device_d *dev; *par = 0; - dev = get_device_by_id(devstr); + dev = get_device_by_name(devstr); if (dev) { par++; ret = dev_get_param(dev, par); @@ -213,7 +213,7 @@ int setenv(const char *_name, const char *value) struct device_d *dev; *par++ = 0; - dev = get_device_by_id(name); + dev = get_device_by_name(name); if (dev) ret = dev_set_param(dev, par, value); else |