diff options
author | Andrei Emeltchenko <andrei.emeltchenko@nokia.com> | 2010-12-01 09:58:25 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2010-12-01 18:04:43 -0500 |
commit | 70f23020e6d89155504b5b39f22505f4aec6fa6f (patch) | |
tree | 91fb41030acd0d2a2ca3e55be2373c5a70284d0c /net/bluetooth/hci_event.c | |
parent | 894718a6be69d8cfd191dc291b42be32a1e4851b (diff) |
Bluetooth: clean up hci code
Do not use assignment in IF condition, remove extra spaces,
fixing typos, simplify code.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 3c1957c82b61..8923b36a67a2 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #include <net/sock.h> | 39 | #include <net/sock.h> |
40 | 40 | ||
41 | #include <asm/system.h> | 41 | #include <asm/system.h> |
42 | #include <asm/uaccess.h> | 42 | #include <linux/uaccess.h> |
43 | #include <asm/unaligned.h> | 43 | #include <asm/unaligned.h> |
44 | 44 | ||
45 | #include <net/bluetooth/bluetooth.h> | 45 | #include <net/bluetooth/bluetooth.h> |
@@ -1512,10 +1512,12 @@ static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *s | |||
1512 | conn->sent -= count; | 1512 | conn->sent -= count; |
1513 | 1513 | ||
1514 | if (conn->type == ACL_LINK) { | 1514 | if (conn->type == ACL_LINK) { |
1515 | if ((hdev->acl_cnt += count) > hdev->acl_pkts) | 1515 | hdev->acl_cnt += count; |
1516 | if (hdev->acl_cnt > hdev->acl_pkts) | ||
1516 | hdev->acl_cnt = hdev->acl_pkts; | 1517 | hdev->acl_cnt = hdev->acl_pkts; |
1517 | } else { | 1518 | } else { |
1518 | if ((hdev->sco_cnt += count) > hdev->sco_pkts) | 1519 | hdev->sco_cnt += count; |
1520 | if (hdev->sco_cnt > hdev->sco_pkts) | ||
1519 | hdev->sco_cnt = hdev->sco_pkts; | 1521 | hdev->sco_cnt = hdev->sco_pkts; |
1520 | } | 1522 | } |
1521 | } | 1523 | } |