@@ -177,6 +177,7 @@ struct eeepc_laptop {
struct hotplug_slot *hotplug_slot;
struct mutex hotplug_lock;
+ bool hotplug_enabled;
struct led_classdev tpd_led;
int tpd_led_wk;
@@ -642,6 +643,7 @@ static int eeepc_register_rfkill_notifier(struct eeepc_laptop *eeepc,
eeepc);
if (ACPI_FAILURE(status))
pr_warning("Failed to register notify on %s\n", node);
+ eeepc->hotplug_enabled = true;
} else
return -ENODEV;
@@ -845,7 +847,17 @@ static int eeepc_rfkill_init(struct eeepc_laptop *eeepc)
if (result && result != -ENODEV)
goto exit;
- result = eeepc_setup_pci_hotplug(eeepc);
+ /*
+ * Register notifiers first, if they all fail, we won't enable
+ * pci hotplug because it's probably not needed for this model
+ * (eg: 1005HA)
+ */
+ eeepc_register_rfkill_notifier(eeepc, "\\_SB.PCI0.P0P5");
+ eeepc_register_rfkill_notifier(eeepc, "\\_SB.PCI0.P0P6");
+ eeepc_register_rfkill_notifier(eeepc, "\\_SB.PCI0.P0P7");
+
+ if (eeepc->hotplug_enabled)
+ result = eeepc_setup_pci_hotplug(eeepc);
/*
* If we get -EBUSY then something else is handling the PCI hotplug -
* don't fail in this case
@@ -853,9 +865,6 @@ static int eeepc_rfkill_init(struct eeepc_laptop *eeepc)
if (result == -EBUSY)
result = 0;
- eeepc_register_rfkill_notifier(eeepc, "\\_SB.PCI0.P0P5");
- eeepc_register_rfkill_notifier(eeepc, "\\_SB.PCI0.P0P6");
- eeepc_register_rfkill_notifier(eeepc, "\\_SB.PCI0.P0P7");
/*
* Refresh pci hotplug in case the rfkill state was changed during
* setup.