Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165232
b: refs/heads/master
c: c200da5
h: refs/heads/master
v: v3
  • Loading branch information
Alan Jenkins authored and Len Brown committed Aug 28, 2009
1 parent b7ad3d7 commit 97235a3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1edd99f1c2b0285ce810d217180bf37bbae550e
refs/heads/master: c200da5d2900df9c24fb8041870d92a4175bbef3
25 changes: 19 additions & 6 deletions trunk/drivers/platform/x86/eeepc-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,19 @@ struct eeepc_hotk {
static struct eeepc_hotk *ehotk;

/* Platform device/driver */
static int eeepc_hotk_thaw(struct device *device);
static int eeepc_hotk_restore(struct device *device);

static struct dev_pm_ops eeepc_pm_ops = {
.thaw = eeepc_hotk_thaw,
.restore = eeepc_hotk_restore,
};

static struct platform_driver platform_driver = {
.driver = {
.name = EEEPC_HOTK_FILE,
.owner = THIS_MODULE,
.pm = &eeepc_pm_ops,
}
};

Expand Down Expand Up @@ -192,7 +201,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[] = {
Expand All @@ -209,7 +217,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,
},
};
Expand Down Expand Up @@ -821,22 +828,28 @@ static int eeepc_setup_pci_hotplug(void)
return ret;
}

static int eeepc_hotk_resume(struct acpi_device *device)
static int eeepc_hotk_thaw(struct device *device)
{
if (ehotk->wlan_rfkill) {
bool wlan;

/*
* Work around bios bug - acpi _PTS turns off the wireless led
* during suspend. Normally it restores it on resume, but
* we should kick it ourselves in case suspend is aborted.
* we should kick it ourselves in case hibernation is aborted.
*/
wlan = get_acpi(CM_ASL_WLAN);
set_acpi(CM_ASL_WLAN, wlan);
}

return 0;
}

/* Refresh both rfkill state and pci hotplug */
static int eeepc_hotk_restore(struct device *device)
{
/* Refresh both wlan rfkill state and pci hotplug */
if (ehotk->wlan_rfkill)
eeepc_rfkill_hotplug();
}

if (ehotk->bluetooth_rfkill)
rfkill_set_sw_state(ehotk->bluetooth_rfkill,
Expand Down

0 comments on commit 97235a3

Please sign in to comment.