2012-01-04 14:57:17

by Vinicius Costa Gomes

[permalink] [raw]
Subject: [PATCH] Bluetooth: Fix using an absolute timeout on hci_conn_put()

queue_delayed_work() expects a relative time for when that work
should be scheduled.

Signed-off-by: Vinicius Costa Gomes <[email protected]>
---
include/net/bluetooth/hci_core.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index ea9231f..92b8fea 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -561,7 +561,7 @@ static inline void hci_conn_put(struct hci_conn *conn)
}
cancel_delayed_work_sync(&conn->disc_work);
queue_delayed_work(conn->hdev->workqueue,
- &conn->disc_work, jiffies + timeo);
+ &conn->disc_work, timeo);
}
}

--
1.7.8.1



2012-01-08 20:31:11

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Fix using an absolute timeout on hci_conn_put()

Hi Vinicius,

On Wed, Jan 04, 2012, Vinicius Costa Gomes wrote:
> queue_delayed_work() expects a relative time for when that work
> should be scheduled.
>
> Signed-off-by: Vinicius Costa Gomes <[email protected]>
> ---
> include/net/bluetooth/hci_core.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

Applied to my bluetooth-next tree. Thanks.

Johan

2012-01-04 15:47:53

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Fix using an absolute timeout on hci_conn_put()

Hi Vinicius,

> queue_delayed_work() expects a relative time for when that work
> should be scheduled.
>
> Signed-off-by: Vinicius Costa Gomes <[email protected]>
> ---
> include/net/bluetooth/hci_core.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

Acked-by: Marcel Holtmann <[email protected]>

Regards

Marcel