aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/Kconfig22
-rw-r--r--drivers/misc/thinkpad_acpi.c10
-rw-r--r--drivers/misc/thinkpad_acpi.h2
3 files changed, 25 insertions, 9 deletions
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index aaaa61ea4217..518d5d335464 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -200,14 +200,22 @@ config THINKPAD_ACPI_BAY
200config THINKPAD_ACPI_INPUT_ENABLED 200config THINKPAD_ACPI_INPUT_ENABLED
201 bool "Enable input layer support by default" 201 bool "Enable input layer support by default"
202 depends on THINKPAD_ACPI 202 depends on THINKPAD_ACPI
203 default y 203 default n
204 ---help--- 204 ---help---
205 Enables hot key handling over the input layer by default. If unset, 205 This option enables thinkpad-acpi hot key handling over the input
206 the driver does not enable any hot key handling by default, and also 206 layer at driver load time. When it is unset, the driver does not
207 starts up with a mostly empty keymap. 207 enable hot key handling by default, and also starts up with a mostly
208 208 empty keymap.
209 If you are not sure, say Y here. Say N to retain the deprecated 209
210 behavior of ibm-acpi, and thinkpad-acpi for kernels up to 2.6.21. 210 This option should be enabled if you have a new enough HAL or other
211 userspace support that properly handles the thinkpad-acpi event
212 device. It auto-tunes the hot key support to those reported by the
213 firmware and enables it automatically.
214
215 If unsure, say N here to retain the old behaviour of ibm-acpi, and
216 thinkpad-acpi up to kernel 2.6.21: userspace will have to enable and
217 set up the thinkpad-acpi hot key handling using the sysfs interace
218 after loading the driver.
211 219
212 220
213endif # MISC_DEVICES 221endif # MISC_DEVICES
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index fa80f355e522..f6cd34a3dbac 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -4668,12 +4668,15 @@ static int __init thinkpad_acpi_module_init(void)
4668 thinkpad_acpi_module_exit(); 4668 thinkpad_acpi_module_exit();
4669 return ret; 4669 return ret;
4670 } 4670 }
4671 tp_features.platform_drv_registered = 1;
4672
4671 ret = tpacpi_create_driver_attributes(&tpacpi_pdriver.driver); 4673 ret = tpacpi_create_driver_attributes(&tpacpi_pdriver.driver);
4672 if (ret) { 4674 if (ret) {
4673 printk(IBM_ERR "unable to create sysfs driver attributes\n"); 4675 printk(IBM_ERR "unable to create sysfs driver attributes\n");
4674 thinkpad_acpi_module_exit(); 4676 thinkpad_acpi_module_exit();
4675 return ret; 4677 return ret;
4676 } 4678 }
4679 tp_features.platform_drv_attrs_registered = 1;
4677 4680
4678 4681
4679 /* Device initialization */ 4682 /* Device initialization */
@@ -4756,8 +4759,11 @@ static void thinkpad_acpi_module_exit(void)
4756 if (tpacpi_pdev) 4759 if (tpacpi_pdev)
4757 platform_device_unregister(tpacpi_pdev); 4760 platform_device_unregister(tpacpi_pdev);
4758 4761
4759 tpacpi_remove_driver_attributes(&tpacpi_pdriver.driver); 4762 if (tp_features.platform_drv_attrs_registered)
4760 platform_driver_unregister(&tpacpi_pdriver); 4763 tpacpi_remove_driver_attributes(&tpacpi_pdriver.driver);
4764
4765 if (tp_features.platform_drv_registered)
4766 platform_driver_unregister(&tpacpi_pdriver);
4761 4767
4762 if (proc_dir) 4768 if (proc_dir)
4763 remove_proc_entry(IBM_PROC_DIR, acpi_root_dir); 4769 remove_proc_entry(IBM_PROC_DIR, acpi_root_dir);
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index 88af089d6494..eee8809a50d9 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -246,6 +246,8 @@ static struct {
246 u16 wan:1; 246 u16 wan:1;
247 u16 fan_ctrl_status_undef:1; 247 u16 fan_ctrl_status_undef:1;
248 u16 input_device_registered:1; 248 u16 input_device_registered:1;
249 u16 platform_drv_registered:1;
250 u16 platform_drv_attrs_registered:1;
249} tp_features; 251} tp_features;
250 252
251struct thinkpad_id_data { 253struct thinkpad_id_data {