@@ -143,7 +143,6 @@ struct eeepc_hotk {
struct rfkill *bluetooth_rfkill;
struct rfkill *wwan3g_rfkill;
struct hotplug_slot *hotplug_slot;
- struct work_struct hotplug_work;
};
/* The actual device the driver binds to */
@@ -192,7 +191,6 @@ static struct key_entry eeepc_keymap[] = {
*/
static int eeepc_hotk_add(struct acpi_device *device);
static int eeepc_hotk_remove(struct acpi_device *device, int type);
-static int eeepc_hotk_resume(struct acpi_device *device);
static void eeepc_hotk_notify(struct acpi_device *device, u32 event);
static const struct acpi_device_id eeepc_device_ids[] = {
@@ -209,7 +207,6 @@ static struct acpi_driver eeepc_hotk_driver = {
.ops = {
.add = eeepc_hotk_add,
.remove = eeepc_hotk_remove,
- .resume = eeepc_hotk_resume,
.notify = eeepc_hotk_notify,
},
};
@@ -661,12 +658,15 @@ static int eeepc_get_adapter_status(struct hotplug_slot *hotplug_slot,
return 0;
}
-static void eeepc_hotplug_work(struct work_struct *work)
+static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data)
{
struct pci_dev *dev;
struct pci_bus *bus = pci_find_bus(0, 1);
bool blocked;
+ if (event != ACPI_NOTIFY_BUS_CHECK)
+ return;
+
if (!bus) {
pr_warning("Unable to find PCI bus 1?\n");
return;
@@ -697,14 +697,6 @@ static void eeepc_hotplug_work(struct work_struct *work)
rfkill_set_sw_state(ehotk->wlan_rfkill, blocked);
}
-static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data)
-{
- if (event != ACPI_NOTIFY_BUS_CHECK)
- return;
-
- schedule_work(&ehotk->hotplug_work);
-}
-
static void eeepc_hotk_notify(struct acpi_device *device, u32 event)
{
static struct key_entry *key;
@@ -877,32 +869,6 @@ static int eeepc_hotk_remove(struct acpi_device *device, int type)
return 0;
}
-static int eeepc_hotk_resume(struct acpi_device *device)
-{
- if (ehotk->wlan_rfkill) {
- bool wlan;
-
- /* Workaround - it seems that _PTS disables the wireless
- without notification or changing the value read by WLAN.
- Normally this is fine because the correct value is restored
- from the non-volatile storage on resume, but we need to do
- it ourself if case suspend is aborted, or we lose wireless.
- */
- wlan = get_acpi(CM_ASL_WLAN);
- set_acpi(CM_ASL_WLAN, wlan);
-
- rfkill_set_sw_state(ehotk->wlan_rfkill, wlan != 1);
-
- schedule_work(&ehotk->hotplug_work);
- }
-
- if (ehotk->bluetooth_rfkill)
- rfkill_set_sw_state(ehotk->bluetooth_rfkill,
- get_acpi(CM_ASL_BLUETOOTH) != 1);
-
- return 0;
-}
-
/*
* Hwmon
*/
@@ -1094,8 +1060,6 @@ static int eeepc_rfkill_init(struct device *dev)
{
int result = 0;
- INIT_WORK(&ehotk->hotplug_work, eeepc_hotplug_work);
-
eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6");
eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7");