diff options
author | Andre Guedes <andre.guedes@openbossa.org> | 2013-02-01 09:21:30 -0500 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-02-01 12:50:18 -0500 |
commit | a3d09356491d637548dbe815ddb966f52ec9e53a (patch) | |
tree | a50d37505e519fbb6f9ab82e893282916153884f /net/bluetooth | |
parent | 2b8a9a2e6a2143928819f2fb948d3904746e1582 (diff) |
Bluetooth: Refactor mgmt_pending_foreach
This patch does a trivial refactor in mgmt_pending_foreach function.
It replaces list_for_each_safe by list_for_each_entry_safe, simplifying
the function.
Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/mgmt.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 3bd4c41c6a1b..39395c7144aa 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -760,13 +760,9 @@ static void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev, | |||
760 | void *data), | 760 | void *data), |
761 | void *data) | 761 | void *data) |
762 | { | 762 | { |
763 | struct list_head *p, *n; | 763 | struct pending_cmd *cmd, *tmp; |
764 | |||
765 | list_for_each_safe(p, n, &hdev->mgmt_pending) { | ||
766 | struct pending_cmd *cmd; | ||
767 | |||
768 | cmd = list_entry(p, struct pending_cmd, list); | ||
769 | 764 | ||
765 | list_for_each_entry_safe(cmd, tmp, &hdev->mgmt_pending, list) { | ||
770 | if (opcode > 0 && cmd->opcode != opcode) | 766 | if (opcode > 0 && cmd->opcode != opcode) |
771 | continue; | 767 | continue; |
772 | 768 | ||