rfkill: disentangle polling pause and suspend

When suspended while polling is paused, polling will erroneously
resume at resume time. Fix this by tracking pause and suspend in
separate state variable and adding the necessary checks.

Clarify the documentation on this as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg
2016-01-20 10:39:23 +01:00
parent f06b7ab875
commit dd21dfc645
2 changed files with 17 additions and 3 deletions

View File

@@ -104,7 +104,8 @@ int __must_check rfkill_register(struct rfkill *rfkill);
*
* Pause polling -- say transmitter is off for other reasons.
* NOTE: not necessary for suspend/resume -- in that case the
* core stops polling anyway
* core stops polling anyway (but will also correctly handle
* the case of polling having been paused before suspend.)
*/
void rfkill_pause_polling(struct rfkill *rfkill);