aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/thinkpad_acpi.c
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2009-09-12 14:22:17 -0400
committerLen Brown <len.brown@intel.com>2009-09-19 00:54:04 -0400
commit230d8cf25ac32c7d2fdb4dda861ec5d954000ffb (patch)
tree9a5669e8574cea3a5fc715c93681caa0f0eaf1fe /drivers/platform/x86/thinkpad_acpi.c
parent20c9aa46f644b3ddb161a819d1b0c2b07097c4ee (diff)
thinkpad-acpi: don't poll by default any of the reserved hotkeys
Init hotkey_source_mask late, so that we can make use of hotkey_reserved_mask to avoid polling any of the reserved hotkeys by default. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/platform/x86/thinkpad_acpi.c')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index dd779e54894f..9c3bb0c498e1 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3062,19 +3062,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
3062 goto err_exit; 3062 goto err_exit;
3063 } 3063 }
3064 3064
3065#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
3066 if (tp_features.hotkey_mask) {
3067 hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK
3068 & ~hotkey_all_mask;
3069 } else {
3070 hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK;
3071 }
3072
3073 vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
3074 "hotkey source mask 0x%08x, polling freq %u\n",
3075 hotkey_source_mask, hotkey_poll_freq);
3076#endif
3077
3078#ifdef CONFIG_THINKPAD_ACPI_DEBUGFACILITIES 3065#ifdef CONFIG_THINKPAD_ACPI_DEBUGFACILITIES
3079 if (dbg_wlswemul) { 3066 if (dbg_wlswemul) {
3080 tp_features.hotkey_wlsw = 1; 3067 tp_features.hotkey_wlsw = 1;
@@ -3186,6 +3173,21 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
3186 | (1 << TP_ACPI_HOTKEYSCAN_FNEND); 3173 | (1 << TP_ACPI_HOTKEYSCAN_FNEND);
3187 } 3174 }
3188 3175
3176#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL
3177 if (tp_features.hotkey_mask) {
3178 hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK
3179 & ~hotkey_all_mask
3180 & ~hotkey_reserved_mask;
3181 } else {
3182 hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK
3183 & ~hotkey_reserved_mask;
3184 }
3185
3186 vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
3187 "hotkey source mask 0x%08x, polling freq %u\n",
3188 hotkey_source_mask, hotkey_poll_freq);
3189#endif
3190
3189 dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY, 3191 dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY,
3190 "enabling firmware HKEY event interface...\n"); 3192 "enabling firmware HKEY event interface...\n");
3191 res = hotkey_status_set(true); 3193 res = hotkey_status_set(true);