From 21f8bb5398591bebbfa9131db856aa24bf5c39ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Sun, 17 Feb 2008 23:25:57 -0800 Subject: [PATCH] --- yaml --- r: 85839 b: refs/heads/master c: 82453021b8be85171350c695d7ebafe7b517c812 h: refs/heads/master i: 85837: 4cb922246e7db07596acb61cc5792f8a05b802ed 85835: bd2dd2e45815f8c5c79229e7791043ba54e2dbc8 85831: 3fd30ad074d7ec17f66d3e6c8509518d8d8e21fe 85823: fe80c8b6b0ed711f50756e7d232a8229c793c037 v: v3 --- [refs] | 2 +- trunk/net/bluetooth/hci_core.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 574b5d50ea21..f79e1b21e857 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5ee46e562c9c10a5e25920c4406a42061cf27839 +refs/heads/master: 82453021b8be85171350c695d7ebafe7b517c812 diff --git a/trunk/net/bluetooth/hci_core.c b/trunk/net/bluetooth/hci_core.c index 372b0d3b75a8..930b58e7149a 100644 --- a/trunk/net/bluetooth/hci_core.c +++ b/trunk/net/bluetooth/hci_core.c @@ -24,6 +24,7 @@ /* Bluetooth HCI core. */ +#include #include #include @@ -1321,7 +1322,7 @@ static inline void hci_sched_acl(struct hci_dev *hdev) if (!test_bit(HCI_RAW, &hdev->flags)) { /* ACL tx timeout must be longer than maximum * link supervision timeout (40.9 seconds) */ - if (!hdev->acl_cnt && (jiffies - hdev->acl_last_tx) > (HZ * 45)) + if (!hdev->acl_cnt && time_after(jiffies, hdev->acl_last_tx + HZ * 45)) hci_acl_tx_to(hdev); } @@ -1543,7 +1544,7 @@ static void hci_cmd_task(unsigned long arg) BT_DBG("%s cmd %d", hdev->name, atomic_read(&hdev->cmd_cnt)); - if (!atomic_read(&hdev->cmd_cnt) && (jiffies - hdev->cmd_last_tx) > HZ) { + if (!atomic_read(&hdev->cmd_cnt) && time_after(jiffies, hdev->cmd_last_tx + HZ)) { BT_ERR("%s command tx timeout", hdev->name); atomic_set(&hdev->cmd_cnt, 1); }