aboutsummaryrefslogtreecommitdiffstats
path: root/net/rfkill
diff options
context:
space:
mode:
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>2009-06-08 13:12:23 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-06-10 13:28:37 -0400
commit908209c160da8ecb68052111972b7a21310eac3f (patch)
treea888e1a29212e88d7182fa3f438c6f348362c432 /net/rfkill
parent869fb3a46cd18235e6f176328a2d8085ffe2c704 (diff)
downloadkernel_samsung_tuna-908209c160da8ecb68052111972b7a21310eac3f.zip
kernel_samsung_tuna-908209c160da8ecb68052111972b7a21310eac3f.tar.gz
kernel_samsung_tuna-908209c160da8ecb68052111972b7a21310eac3f.tar.bz2
rfkill: don't impose global states on resume (just restore the previous states)
Once rfkill-input is disabled, the "global" states will only be used as default initial states. Since the states will always be the same after resume, we shouldn't generate events on resume. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/rfkill')
-rw-r--r--net/rfkill/core.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index fa430bd..4e68ab4 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -728,15 +728,11 @@ static int rfkill_resume(struct device *dev)
struct rfkill *rfkill = to_rfkill(dev);
bool cur;
- mutex_lock(&rfkill_global_mutex);
- cur = rfkill_global_states[rfkill->type].cur;
+ cur = !!(rfkill->state & RFKILL_BLOCK_SW);
rfkill_set_block(rfkill, cur);
- mutex_unlock(&rfkill_global_mutex);
rfkill->suspended = false;
- schedule_work(&rfkill->uevent_work);
-
rfkill_resume_polling(rfkill);
return 0;