diff options
author | Alan Jenkins <alan-jenkins@tuffmail.co.uk> | 2009-08-28 08:56:32 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-08-28 15:21:10 -0400 |
commit | 6d41839e762f8b8b03dbb97fd0d41b244d0bc902 (patch) | |
tree | 168fa39bf92766bffeaaa0247bc64e522e18c08d | |
parent | 326ba5010a5429a5a528b268b36a5900d4ab0eba (diff) |
eeepc-laptop: don't touch the pci slot if it was claimed by a different driver
The whole point of registering as a PCI hotplug driver was to prevent
conflict with pciehp. At the moment it happens to work because
eeepc-laptop is loaded first, but it doesn't work the other way round.
If pciehp is loaded first then we fail to claim the slot - we need to
respect this and not handle hotplug events.
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>
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 222ffb892f22..69d73ed2c8ab 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -664,15 +664,20 @@ static int eeepc_get_adapter_status(struct hotplug_slot *hotplug_slot, | |||
664 | static void eeepc_hotplug_work(struct work_struct *work) | 664 | static void eeepc_hotplug_work(struct work_struct *work) |
665 | { | 665 | { |
666 | struct pci_dev *dev; | 666 | struct pci_dev *dev; |
667 | struct pci_bus *bus = pci_find_bus(0, 1); | 667 | struct pci_bus *bus; |
668 | bool blocked; | 668 | bool blocked = eeepc_wlan_rfkill_blocked(); |
669 | |||
670 | rfkill_set_sw_state(ehotk->wlan_rfkill, blocked); | ||
669 | 671 | ||
672 | if (ehotk->hotplug_slot == NULL) | ||
673 | return; | ||
674 | |||
675 | bus = pci_find_bus(0, 1); | ||
670 | if (!bus) { | 676 | if (!bus) { |
671 | pr_warning("Unable to find PCI bus 1?\n"); | 677 | pr_warning("Unable to find PCI bus 1?\n"); |
672 | return; | 678 | return; |
673 | } | 679 | } |
674 | 680 | ||
675 | blocked = eeepc_wlan_rfkill_blocked(); | ||
676 | if (!blocked) { | 681 | if (!blocked) { |
677 | dev = pci_get_slot(bus, 0); | 682 | dev = pci_get_slot(bus, 0); |
678 | if (dev) { | 683 | if (dev) { |
@@ -693,8 +698,6 @@ static void eeepc_hotplug_work(struct work_struct *work) | |||
693 | pci_dev_put(dev); | 698 | pci_dev_put(dev); |
694 | } | 699 | } |
695 | } | 700 | } |
696 | |||
697 | rfkill_set_sw_state(ehotk->wlan_rfkill, blocked); | ||
698 | } | 701 | } |
699 | 702 | ||
700 | static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) | 703 | static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) |