From: Henrique de Moraes Holschuh Date: Fri, 21 Nov 2008 22:40:09 +0000 (-0200) Subject: rfkill: preserve state across suspend X-Git-Tag: v2.6.29-rc1~581^2~383^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f80b5e99c7dac5a9a0d72496cec5075a12cd1476;p=pandora-kernel.git 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 Acked-by: Ivo van Doorn Cc: Matthew Garrett Cc: Alan Jenkins Signed-off-by: John W. Linville --- Reading git-diff-tree failed