diff options
-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) |