aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacky Cheung <jackyc@google.com>2016-01-25 15:31:28 -0800
committerDevin Kim <dojip.kim@lge.com>2016-03-15 13:52:42 -0700
commit2e918211eabb2843d87ac3c02baf5b03d84790f7 (patch)
tree8cdc5136fc4582aa7912010fa1dc657fcd0a9525
parentd665ac89b5eb8c6accb22f79aee5825da10491c6 (diff)
Fix issue with Rfkill core and Nitrous BT power states out of sync.android-wear-6.0.1_r0.7android-wear-6.0.1_r0.4
Tidy up the initial states of both Rfkill and Nitrous to be blocked (powered down) initially. There was a mismatch in the states of these two components that caused the rfkill_resume() to power the BT back on erroneously when it should be stayed off. Change-Id: I44ae0c58d697122475a5df77d5e015a6059000e0
-rw-r--r--drivers/bluetooth/nitrous.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/bluetooth/nitrous.c b/drivers/bluetooth/nitrous.c
index f89738346a61..10ec179e2d21 100644
--- a/drivers/bluetooth/nitrous.c
+++ b/drivers/bluetooth/nitrous.c
@@ -362,14 +362,13 @@ static int nitrous_rfkill_init(struct platform_device *pdev,
goto err_rfkill_alloc;
}
+ /* Make sure rfkill core is initialized to be blocked initially. */
+ rfkill_init_sw_state(lpm->rfkill, true);
rc = rfkill_register(lpm->rfkill);
if (unlikely(rc))
goto err_rfkill_register;
- rfkill_set_states(lpm->rfkill, true, false);
- /* Set blocked state to false, so the call to
- bt_rfkill_set_power can run and set blocked to true */
- lpm->rfkill_blocked = false;
+ /* Power off chip at startup. */
nitrous_rfkill_set_power(lpm, true);
return 0;