aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210/aries-rfkill.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s5pv210/aries-rfkill.c')
-rw-r--r--arch/arm/mach-s5pv210/aries-rfkill.c10
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;