]> git.baikalelectronics.ru Git - kernel.git/commit
classmate-laptop: little optimization for cmpc_rfkill_block
authorHerton Ronaldo Krzesinski <herton@mandriva.com.br>
Tue, 30 Nov 2010 18:30:43 +0000 (16:30 -0200)
committerMatthew Garrett <mjg@redhat.com>
Fri, 7 Jan 2011 22:03:41 +0000 (17:03 -0500)
commit42c8733209a586afa0247a0e31bca999fb25f07e
treec0b6bc8bb6e39e813cf3711c7a4fd95d899c4a9f
parent96790341b043c1dc7285bd4594a4a819e1a0f2a8
classmate-laptop: little optimization for cmpc_rfkill_block

We don't need to call bios/acpi (cmpc_set_rfkill_wlan) if the blocked
state is already set to the same value (little optimization). This can
happen for example if we initialize the module with same initial
hardware state (rfkill core always call cmpc_rfkill_block on
initialization here).

Also GWRI method only accepts 0 or 1 for setting rfkill block, as can be
seen on AML code from acpidump->DSDT from a classmate sample I have, so
should be fine setting state only to 0 or 1 directly.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
drivers/platform/x86/classmate-laptop.c