diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-12-09 10:10:19 +0700 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2012-12-09 10:11:59 +0700 |
commit | 19a208a64958ff0cefb43c7b1623307ca090edd2 (patch) | |
tree | 45389497be87b79c21c84e0d79889c1a20f53a25 /arch/arm | |
parent | adbff11f9517c5296e452a1034d05864cf3dbfb3 (diff) | |
download | kernel_samsung_aries-19a208a64958ff0cefb43c7b1623307ca090edd2.zip kernel_samsung_aries-19a208a64958ff0cefb43c7b1623307ca090edd2.tar.gz kernel_samsung_aries-19a208a64958ff0cefb43c7b1623307ca090edd2.tar.bz2 |
aries: rfkill: fix unbalanced irq
BlueDroid makes disable call to rfkill which it is already disabled
causing unbalanced irq which prevents the device from going to sleep
Change-Id: If188d952ff368c03cb6a5a45d48cabc5f5e05501
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s5pv210/aries-rfkill.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-s5pv210/aries-rfkill.c b/arch/arm/mach-s5pv210/aries-rfkill.c index 6cbc52e..c59487e 100644 --- a/arch/arm/mach-s5pv210/aries-rfkill.c +++ b/arch/arm/mach-s5pv210/aries-rfkill.c @@ -48,6 +48,7 @@ static struct wake_lock rfkill_wake_lock; static struct rfkill *bt_rfk; static const char bt_name[] = "bcm4329"; +static bool current_blocked = true; static int bluetooth_set_power(void *data, enum rfkill_user_states state) { @@ -171,6 +172,13 @@ static int bt_rfkill_set_block(void *data, bool blocked) { unsigned int ret = 0; + if (current_blocked == blocked) { + pr_debug("[BT] keeping current blocked state %d\n", blocked); + return ret; + } + + current_blocked = blocked; + ret = bluetooth_set_power(data, blocked ? RFKILL_USER_STATE_SOFT_BLOCKED : RFKILL_USER_STATE_UNBLOCKED); @@ -236,7 +244,7 @@ static int __init aries_rfkill_probe(struct platform_device *pdev) } rfkill_set_sw_state(bt_rfk, 1); - bluetooth_set_power(NULL, RFKILL_USER_STATE_SOFT_BLOCKED); + bt_rfkill_set_block(NULL, true); return ret; |