aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/Kconfig27
-rw-r--r--drivers/misc/sony-laptop.c7
-rw-r--r--drivers/misc/thinkpad_acpi.c10
-rw-r--r--drivers/misc/thinkpad_acpi.h2
4 files changed, 36 insertions, 10 deletions
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index aaaa61ea4217..a26655881e6a 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -5,6 +5,11 @@
5menuconfig MISC_DEVICES 5menuconfig MISC_DEVICES
6 bool "Misc devices" 6 bool "Misc devices"
7 default y 7 default y
8 ---help---
9 Say Y here to get to see options for device drivers from various
10 different categories. This option alone does not add any kernel code.
11
12 If you say N, all options in this submenu will be skipped and disabled.
8 13
9if MISC_DEVICES 14if MISC_DEVICES
10 15
@@ -200,14 +205,22 @@ config THINKPAD_ACPI_BAY
200config THINKPAD_ACPI_INPUT_ENABLED 205config THINKPAD_ACPI_INPUT_ENABLED
201 bool "Enable input layer support by default" 206 bool "Enable input layer support by default"
202 depends on THINKPAD_ACPI 207 depends on THINKPAD_ACPI
203 default y 208 default n
204 ---help--- 209 ---help---
205 Enables hot key handling over the input layer by default. If unset, 210 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 211 layer at driver load time. When it is unset, the driver does not
207 starts up with a mostly empty keymap. 212 enable hot key handling by default, and also starts up with a mostly
208 213 empty keymap.
209 If you are not sure, say Y here. Say N to retain the deprecated 214
210 behavior of ibm-acpi, and thinkpad-acpi for kernels up to 2.6.21. 215 This option should be enabled if you have a new enough HAL or other
216 userspace support that properly handles the thinkpad-acpi event
217 device. It auto-tunes the hot key support to those reported by the
218 firmware and enables it automatically.
219
220 If unsure, say N here to retain the old behaviour of ibm-acpi, and
221 thinkpad-acpi up to kernel 2.6.21: userspace will have to enable and
222 set up the thinkpad-acpi hot key handling using the sysfs interace
223 after loading the driver.
211 224
212 225
213endif # MISC_DEVICES 226endif # MISC_DEVICES
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index 14ee06c8f127..91da6880ae93 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -845,7 +845,7 @@ static struct sony_nc_event sony_C_events[] = {
845}; 845};
846 846
847/* SNC-only model map */ 847/* SNC-only model map */
848struct dmi_system_id sony_nc_ids[] = { 848static struct dmi_system_id sony_nc_ids[] = {
849 { 849 {
850 .ident = "Sony Vaio FE Series", 850 .ident = "Sony Vaio FE Series",
851 .callback = sony_nc_C_enable, 851 .callback = sony_nc_C_enable,
@@ -942,6 +942,11 @@ static int sony_nc_resume(struct acpi_device *device)
942 } 942 }
943 } 943 }
944 944
945 /* set the last requested brightness level */
946 if (sony_backlight_device &&
947 !sony_backlight_update_status(sony_backlight_device))
948 printk(KERN_WARNING DRV_PFX "unable to restore brightness level");
949
945 /* re-initialize models with specific requirements */ 950 /* re-initialize models with specific requirements */
946 dmi_check_system(sony_nc_ids); 951 dmi_check_system(sony_nc_ids);
947 952
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 {