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>
This commit is contained in:
committed by
John W. Linville
parent
869fb3a46c
commit
908209c160
@ -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;
|
||||
|
Reference in New Issue
Block a user