Bluetooth: Remove wake_locks added for BT idle timer

Wakelocks were used to address the issue related to timer
which was not triggered when device was put into suspend
mode.This does not impact the usecases as the link would
be put into sniff mode immediately after the device comes
out of suspend mode.

Change-Id: I648acf32c6ce9bd0d3415ac0e9dcd2250d3fb68d
Signed-off-by: Sumit Bajpai <sbajpai@codeaurora.org>
This commit is contained in:
Sumit Bajpai
2013-03-14 19:18:33 +05:30
parent 46f4744479
commit e6da88d7e7
3 changed files with 0 additions and 8 deletions
-2
View File
@@ -26,7 +26,6 @@
#define __HCI_CORE_H
#include <net/bluetooth/hci.h>
#include <linux/wakelock.h>
/* HCI upper protocols */
#define HCI_PROTO_L2CAP 0
#define HCI_PROTO_SCO 1
@@ -327,7 +326,6 @@ struct hci_conn {
struct work_struct work_add;
struct work_struct work_del;
struct wake_lock idle_lock;
struct device dev;
atomic_t devref;
-3
View File
@@ -543,7 +543,6 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type,
conn->disc_timeout = HCI_DISCONN_TIMEOUT;
conn->conn_valid = true;
spin_lock_init(&conn->lock);
wake_lock_init(&conn->idle_lock, WAKE_LOCK_SUSPEND, "bt_idle");
switch (type) {
case ACL_LINK:
@@ -621,7 +620,6 @@ int hci_conn_del(struct hci_conn *conn)
/* Make sure no timers are running */
del_timer(&conn->idle_timer);
wake_lock_destroy(&conn->idle_lock);
del_timer(&conn->disc_timer);
del_timer(&conn->smp_timer);
__cancel_delayed_work(&conn->rssi_update_work);
@@ -1082,7 +1080,6 @@ timer:
if (conn->conn_valid) {
mod_timer(&conn->idle_timer,
jiffies + msecs_to_jiffies(hdev->idle_timeout));
wake_lock(&conn->idle_lock);
}
spin_unlock_bh(&conn->lock);
}
-3
View File
@@ -2596,9 +2596,6 @@ static inline void hci_mode_change_evt(struct hci_dev *hdev, struct sk_buff *skb
else
conn->power_save = 0;
}
if (conn->mode == HCI_CM_SNIFF)
if (wake_lock_active(&conn->idle_lock))
wake_unlock(&conn->idle_lock);
if (test_and_clear_bit(HCI_CONN_SCO_SETUP_PEND, &conn->pend))
hci_sco_setup(conn, ev->status);