rfkill: add default global states (v2)
commite2bff5b1ccee3252f1cdfec850d2757a1247c5c3
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 19 Oct 2008 21:00:12 +0000 (19 19:00 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 19 Oct 2008 21:00:12 +0000 (19 19:00 -0200)
tree7a4b4d12fc3a11746122b9cb2e8f7297603ede93
parent340288feab081705392f4fdca41e6345a50e4837
rfkill: add default global states (v2)

Add a second set of global states, "rfkill_default_states", to track the
state that will be used when the first rfkill class of a given type is
registered, and also to save "undo" information when rfkill_epo is called.

Add a new exported function, rfkill_set_default(), which can be used by
platform drivers to restore radio state saved by the platform across
reboots or shutdown.

Also, fix rfkill_epo to properly update rfkill_states, but still preserve a
copy of the state so that we can undo the effect of rfkill_epo later if we
want to.  Add rfkill_restore_states() to restore rfkill_states from the
copy.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
include/linux/rfkill.h
net/rfkill/rfkill-input.h
net/rfkill/rfkill.c