mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
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>
This commit is contained in:
parent
f158c3d518
commit
3e3c026ed7
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue