Bluetooth: Update HCI timeouts constants to use msecs_to_jiffies
The HCI constants are always used in form of jiffies. So just
include the conversion from msecs in the define itself. This has the
advantage of making the code where the timeout is used more readable
and avoiding unnecessary conversions.
The patch is similar to commit ba13ccd9 doing the same job for L2CAP
Reported-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This commit is contained in:
committed by
Gustavo Padovan
parent
975b91bb17
commit
5f246e8905
@@ -598,7 +598,7 @@ static inline void hci_conn_put(struct hci_conn *conn)
|
||||
if (conn->type == ACL_LINK || conn->type == LE_LINK) {
|
||||
del_timer(&conn->idle_timer);
|
||||
if (conn->state == BT_CONNECTED) {
|
||||
timeo = msecs_to_jiffies(conn->disc_timeout);
|
||||
timeo = conn->disc_timeout;
|
||||
if (!conn->out)
|
||||
timeo *= 2;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user