瀏覽代碼

Bluetooth: Use list_for_each_entry() in mgmt

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan 14 年之前
父節點
當前提交
12dc074301
共有 1 個文件被更改,包括 2 次插入5 次删除
  1. 2 5
      net/bluetooth/mgmt.c

+ 2 - 5
net/bluetooth/mgmt.c

@@ -694,14 +694,11 @@ static int update_eir(struct hci_dev *hdev)
 
 
 static u8 get_service_classes(struct hci_dev *hdev)
 static u8 get_service_classes(struct hci_dev *hdev)
 {
 {
-	struct list_head *p;
+	struct bt_uuid *uuid;
 	u8 val = 0;
 	u8 val = 0;
 
 
-	list_for_each(p, &hdev->uuids) {
-		struct bt_uuid *uuid = list_entry(p, struct bt_uuid, list);
-
+	list_for_each_entry(uuid, &hdev->uuids, list)
 		val |= uuid->svc_hint;
 		val |= uuid->svc_hint;
-	}
 
 
 	return val;
 	return val;
 }
 }