From: Andrei Emeltchenko Date: Wed, 16 Nov 2011 15:30:20 +0000 (+0200) Subject: Bluetooth: Use queue in the device list X-Git-Tag: v3.3-rc1~182^2~44^2~71^2~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6feeb28aed51831c27c9f42e5c15129b1562a5b;p=platform%2Fkernel%2Flinux-3.10.git Bluetooth: Use queue in the device list Use queue instead of stack discipline for device list. When processing dev_list with list_for_each* devices will be prosessed in order they were added (Usually BR/EDR first and AMP later). Also output from hciconfig looks nicer :-) Signed-off-by: Andrei Emeltchenko Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 086e157..ef0423e 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1452,7 +1452,7 @@ int hci_register_dev(struct hci_dev *hdev) sprintf(hdev->name, "hci%d", id); hdev->id = id; - list_add(&hdev->list, head); + list_add_tail(&hdev->list, head); atomic_set(&hdev->refcnt, 1); spin_lock_init(&hdev->lock);