eeepc-laptop: fix wlan rfkill state change during init
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Mon, 27 Apr 2009 07:23:37 +0000 (09:23 +0200)
committerLen Brown <len.brown@intel.com>
Thu, 14 May 2009 15:14:42 +0000 (11:14 -0400)
commitfbc97e4c5c31ea198f912196b1379d7493362800
tree8835aa89d274fbb76f06384d129b335fd2887630
parent091bf7624d1c90cec9e578a18529f615213ff847
eeepc-laptop: fix wlan rfkill state change during init

When an rfkill device is registered, the rfkill core will change its
state to the system default. So we need to prepare for state changes
*before* we register it. That means installing the eeepc-specific ACPI
callback which handles the hotplug of the wireless network adaptor.

This problem doesn't occur during normal operation.  You have to

1) Boot with wireless enabled. eeepc-laptop should load automatically.
2) modprobe -r eeepc-laptop
3) modprobe eeepc-laptop

On boot, the default rfkill state will be set to enabled.
With the current core code, step 2) will disable the wireless.
Therefore in step 3), the wireless will change state during registration,
from disabled to enabled.  But without this fix, the PCI device for the
wireless adaptor will not appear.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/eeepc-laptop.c