forked from rubenslte/android_kernel_samsung_msm8226
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user