[PATCH 19/27] console_simple: Make use of list_add_tail()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 common/console_simple.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/common/console_simple.c b/common/console_simple.c
index 91b6cb6cd..f13f9d71a 100644
--- a/common/console_simple.c
+++ b/common/console_simple.c
@@ -10,8 +10,7 @@ int console_register(struct console_device *newcdev)
 	if (!list_empty(&console_list))
 		return -EBUSY;
 
-	console_list.prev = console_list.next = &newcdev->list;
-	newcdev->list.prev = newcdev->list.next = &console_list;
+	list_add_tail(&newcdev->list, &console_list);
 
 	if (newcdev->setbrg) {
 		newcdev->baudrate = CONFIG_BAUDRATE;
-- 
2.17.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux