]> git.baikalelectronics.ru Git - kernel.git/commit
rfkill: rfkill_set_block() when suspended nitpick
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Tue, 16 Jun 2009 13:53:24 +0000 (14:53 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 19 Jun 2009 15:50:17 +0000 (11:50 -0400)
commit61e175061c3d08ca11c876386888cde2f25f7126
tree4f27f607618bc48c9b8c83f4169af70abac913d3
parent28259188e56e2a2376809b26608fca48a08bcb8d
rfkill: rfkill_set_block() when suspended nitpick

If we return after fiddling with the state, userspace will see the
wrong state and rfkill_set_sw_state() won't work until the next call to
rfkill_set_block().  At the moment rfkill_set_block() will always be
called from rfkill_resume(), but this will change in future.

Also, presumably the point of this test is to avoid bothering devices
which may be suspended.  If we don't want to call set_block(), we
probably don't want to call query() either :-).

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/rfkill/core.c