summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-09-05 10:47:46 +0200
committerWolfgang Denk <wd@denx.de>2008-09-05 13:27:01 +0200
commit3e3c026ed746a284c6f0ef139b26d859939de7e9 (patch)
treea2192b1acd2cbe9432c08228bc027aa42b120962 /common
parentf158c3d51838474c4c36af365af145fbaf92b694 (diff)
downloadblackbird-obmc-uboot-3e3c026ed746a284c6f0ef139b26d859939de7e9.tar.gz
blackbird-obmc-uboot-3e3c026ed746a284c6f0ef139b26d859939de7e9.zip
devices: Use list_add_tail() instead of list_add() to register a device
This patch fixes a problem spotted on Glacier/Canyonlands (and most likely lots of other board ports), that no serial output was seen after console initialization in console_init_r(). This is because the last added console device was used instead of the first added. This patch fixes this problem by using list_add_tail() instead of list_add() to register a device. This way the first added console is used again. Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/devices.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/devices.c b/common/devices.c
index 8beebe255f..7d0ac2e924 100644
--- a/common/devices.c
+++ b/common/devices.c
@@ -155,7 +155,7 @@ int device_register (device_t * dev)
_dev = device_clone(dev);
if(!_dev)
return -1;
- list_add(&(_dev->list), &(devs.list));
+ list_add_tail(&(_dev->list), &(devs.list));
return 0;
}
OpenPOWER on IntegriCloud