OSDN Git Service

eeepc-laptop: fix pci hotplug race on load and unload
authorCorentin Chary <corentincj@iksaif.net>
Tue, 29 Sep 2009 13:52:20 +0000 (15:52 +0200)
committerCorentin Chary <corentincj@iksaif.net>
Wed, 30 Sep 2009 20:17:45 +0000 (22:17 +0200)
commit1d6ff4ae7d9a52c89668b1b80ca9320f486820bb
treefc15898b04c525abb86eae6e6019a0edbbce09d3
parent81461075bd7cdb36911c492684a43c8ee1e0c7cd
eeepc-laptop: fix pci hotplug race on load and unload

Wifi rfkill state changes can race with pci hotplug cleanup.  A simple
fix is to refresh the hotplug state just before deregistering the pci
hotplug slot.

There is also potential for a hotplug notification to fire too early
during setup, while the structures it uses are still being initialised.
(This could only happen if the BIOS performs hotplug itself; a bug
triggered by removing the battery while hibernated).  Avoid this by
registering the notifier later.  The same refresh mechanism is used
to handle rfkill state changes which can now race with registration.

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