Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rfkill: preserve state across suspend
The rfkill class API requires that the driver connected to a class call rfkill_force_state() on resume to update the real state of the rfkill controller, OR that it provides a get_state() hook. This means there is potentially a hidden call in the resume code flow that changes rfkill->state (i.e. rfkill_force_state()), so the previous state of the transmitter was being lost. The simplest and most future-proof way to fix this is to explicitly store the pre-sleep state on the rfkill structure, and restore from that on resume. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Alan Jenkins <[email protected]> Signed-off-by: John W. Linville <[email protected]>
- Loading branch information