Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86120
b: refs/heads/master
c: 1bc6b9c
h: refs/heads/master
v: v3
  • Loading branch information
Henrique de Moraes Holschuh authored and Len Brown committed Feb 16, 2008
1 parent 420ca43 commit 9d9fe77
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 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: 5f24927f48c63e79ff8e286fc8530f4525b4182a
refs/heads/master: 1bc6b9cdd5e608f0b7e6160a823c9dcd51820410
13 changes: 8 additions & 5 deletions trunk/drivers/misc/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,14 @@ static void hotkey_poll_setup_safe(int may_warn)
mutex_unlock(&hotkey_mutex);
}

#else /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */

static void hotkey_poll_setup_safe(int __unused)
{
}

#endif /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */

static int hotkey_inputdev_open(struct input_dev *dev)
{
switch (tpacpi_lifecycle) {
Expand Down Expand Up @@ -1444,7 +1452,6 @@ static void hotkey_inputdev_close(struct input_dev *dev)
if (tpacpi_lifecycle == TPACPI_LIFE_RUNNING)
hotkey_poll_setup_safe(0);
}
#endif /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */

/* sysfs hotkey enable ------------------------------------------------- */
static ssize_t hotkey_enable_show(struct device *dev,
Expand Down Expand Up @@ -2023,12 +2030,10 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
(hotkey_report_mode < 2) ?
"enabled" : "disabled");

#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
tpacpi_inputdev->open = &hotkey_inputdev_open;
tpacpi_inputdev->close = &hotkey_inputdev_close;

hotkey_poll_setup_safe(1);
#endif
}

return (tp_features.hotkey)? 0 : 1;
Expand Down Expand Up @@ -2221,9 +2226,7 @@ static void hotkey_resume(void)
hotkey_radio_sw_notify_change();
hotkey_wakeup_reason_notify_change();
hotkey_wakeup_hotunplug_complete_notify_change();
#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
hotkey_poll_setup_safe(0);
#endif
}

/* procfs -------------------------------------------------------------- */
Expand Down

0 comments on commit 9d9fe77

Please sign in to comment.