diff options
| -rw-r--r-- | Documentation/kernel-parameters.txt | 2 | ||||
| -rw-r--r-- | Documentation/thinkpad-acpi.txt | 4 | ||||
| -rw-r--r-- | drivers/acpi/asus_acpi.c | 1 | ||||
| -rw-r--r-- | drivers/acpi/battery.c | 47 | ||||
| -rw-r--r-- | drivers/acpi/tables/tbxface.c | 23 | ||||
| -rw-r--r-- | drivers/char/sonypi.c | 7 | ||||
| -rw-r--r-- | drivers/misc/Kconfig | 22 | ||||
| -rw-r--r-- | drivers/misc/sony-laptop.c | 7 | ||||
| -rw-r--r-- | drivers/misc/thinkpad_acpi.c | 10 | ||||
| -rw-r--r-- | drivers/misc/thinkpad_acpi.h | 2 | 
10 files changed, 82 insertions, 43 deletions
| diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 06db892b558a..975f029be25c 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -163,6 +163,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
| 163 | acpi_irq_isa= [HW,ACPI] If irq_balance, mark listed IRQs used by ISA | 163 | acpi_irq_isa= [HW,ACPI] If irq_balance, mark listed IRQs used by ISA | 
| 164 | Format: <irq>,<irq>... | 164 | Format: <irq>,<irq>... | 
| 165 | 165 | ||
| 166 | acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT | ||
| 167 | |||
| 166 | acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS | 168 | acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS | 
| 167 | Format: To spoof as Windows 98: ="Microsoft Windows" | 169 | Format: To spoof as Windows 98: ="Microsoft Windows" | 
| 168 | 170 | ||
| diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt index 6711fbcf4080..eb2f5986e1eb 100644 --- a/Documentation/thinkpad-acpi.txt +++ b/Documentation/thinkpad-acpi.txt | |||
| @@ -105,10 +105,10 @@ The version of thinkpad-acpi's sysfs interface is exported by the driver | |||
| 105 | as a driver attribute (see below). | 105 | as a driver attribute (see below). | 
| 106 | 106 | ||
| 107 | Sysfs driver attributes are on the driver's sysfs attribute space, | 107 | Sysfs driver attributes are on the driver's sysfs attribute space, | 
| 108 | for 2.6.20 this is /sys/bus/platform/drivers/thinkpad-acpi/. | 108 | for 2.6.20 this is /sys/bus/platform/drivers/thinkpad_acpi/. | 
| 109 | 109 | ||
| 110 | Sysfs device attributes are on the driver's sysfs attribute space, | 110 | Sysfs device attributes are on the driver's sysfs attribute space, | 
| 111 | for 2.6.20 this is /sys/devices/platform/thinkpad-acpi/. | 111 | for 2.6.20 this is /sys/devices/platform/thinkpad_acpi/. | 
| 112 | 112 | ||
| 113 | Driver version | 113 | Driver version | 
| 114 | -------------- | 114 | -------------- | 
| diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index 9c4bd220c44f..86fd142f4bf3 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c | |||
| @@ -1192,6 +1192,7 @@ static int asus_hotk_get_info(void) | |||
| 1192 | break; | 1192 | break; | 
| 1193 | default: | 1193 | default: | 
| 1194 | kfree(model); | 1194 | kfree(model); | 
| 1195 | model = NULL; | ||
| 1195 | break; | 1196 | break; | 
| 1196 | } | 1197 | } | 
| 1197 | } | 1198 | } | 
| diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 81651032791b..d7b499fe0cd9 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
| @@ -113,7 +113,7 @@ struct acpi_battery_info { | |||
| 113 | acpi_string oem_info; | 113 | acpi_string oem_info; | 
| 114 | }; | 114 | }; | 
| 115 | 115 | ||
| 116 | enum acpi_battery_files{ | 116 | enum acpi_battery_files { | 
| 117 | ACPI_BATTERY_INFO = 0, | 117 | ACPI_BATTERY_INFO = 0, | 
| 118 | ACPI_BATTERY_STATE, | 118 | ACPI_BATTERY_STATE, | 
| 119 | ACPI_BATTERY_ALARM, | 119 | ACPI_BATTERY_ALARM, | 
| @@ -129,13 +129,14 @@ struct acpi_battery_flags { | |||
| 129 | }; | 129 | }; | 
| 130 | 130 | ||
| 131 | struct acpi_battery { | 131 | struct acpi_battery { | 
| 132 | struct mutex mutex; | ||
| 133 | struct acpi_device *device; | 132 | struct acpi_device *device; | 
| 134 | struct acpi_battery_flags flags; | 133 | struct acpi_battery_flags flags; | 
| 135 | struct acpi_buffer bif_data; | 134 | struct acpi_buffer bif_data; | 
| 136 | struct acpi_buffer bst_data; | 135 | struct acpi_buffer bst_data; | 
| 136 | struct mutex lock; | ||
| 137 | unsigned long alarm; | 137 | unsigned long alarm; | 
| 138 | unsigned long update_time[ACPI_BATTERY_NUMFILES]; | 138 | unsigned long update_time[ACPI_BATTERY_NUMFILES]; | 
| 139 | |||
| 139 | }; | 140 | }; | 
| 140 | 141 | ||
| 141 | inline int acpi_battery_present(struct acpi_battery *battery) | 142 | inline int acpi_battery_present(struct acpi_battery *battery) | 
| @@ -235,10 +236,10 @@ static int acpi_battery_get_info(struct acpi_battery *battery) | |||
| 235 | return 0; | 236 | return 0; | 
| 236 | 237 | ||
| 237 | /* Evaluate _BIF */ | 238 | /* Evaluate _BIF */ | 
| 238 | 239 | mutex_lock(&battery->lock); | |
| 239 | status = | 240 | status = acpi_evaluate_object(acpi_battery_handle(battery), "_BIF", | 
| 240 | acpi_evaluate_object(acpi_battery_handle(battery), "_BIF", NULL, | 241 | NULL, &buffer); | 
| 241 | &buffer); | 242 | mutex_unlock(&battery->lock); | 
| 242 | if (ACPI_FAILURE(status)) { | 243 | if (ACPI_FAILURE(status)) { | 
| 243 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF")); | 244 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF")); | 
| 244 | return -ENODEV; | 245 | return -ENODEV; | 
| @@ -285,10 +286,10 @@ static int acpi_battery_get_state(struct acpi_battery *battery) | |||
| 285 | return 0; | 286 | return 0; | 
| 286 | 287 | ||
| 287 | /* Evaluate _BST */ | 288 | /* Evaluate _BST */ | 
| 288 | 289 | mutex_lock(&battery->lock); | |
| 289 | status = | 290 | status = acpi_evaluate_object(acpi_battery_handle(battery), "_BST", | 
| 290 | acpi_evaluate_object(acpi_battery_handle(battery), "_BST", NULL, | 291 | NULL, &buffer); | 
| 291 | &buffer); | 292 | mutex_unlock(&battery->lock); | 
| 292 | if (ACPI_FAILURE(status)) { | 293 | if (ACPI_FAILURE(status)) { | 
| 293 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST")); | 294 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST")); | 
| 294 | return -ENODEV; | 295 | return -ENODEV; | 
| @@ -336,9 +337,10 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery, | |||
| 336 | 337 | ||
| 337 | arg0.integer.value = alarm; | 338 | arg0.integer.value = alarm; | 
| 338 | 339 | ||
| 339 | status = | 340 | mutex_lock(&battery->lock); | 
| 340 | acpi_evaluate_object(acpi_battery_handle(battery), "_BTP", | 341 | status = acpi_evaluate_object(acpi_battery_handle(battery), "_BTP", | 
| 341 | &arg_list, NULL); | 342 | &arg_list, NULL); | 
| 343 | mutex_unlock(&battery->lock); | ||
| 342 | if (ACPI_FAILURE(status)) | 344 | if (ACPI_FAILURE(status)) | 
| 343 | return -ENODEV; | 345 | return -ENODEV; | 
| 344 | 346 | ||
| @@ -658,8 +660,6 @@ acpi_battery_write_alarm(struct file *file, | |||
| 658 | if (!battery || (count > sizeof(alarm_string) - 1)) | 660 | if (!battery || (count > sizeof(alarm_string) - 1)) | 
| 659 | return -EINVAL; | 661 | return -EINVAL; | 
| 660 | 662 | ||
| 661 | mutex_lock(&battery->mutex); | ||
| 662 | |||
| 663 | result = acpi_battery_update(battery, 1, &update_result); | 663 | result = acpi_battery_update(battery, 1, &update_result); | 
| 664 | if (result) { | 664 | if (result) { | 
| 665 | result = -ENODEV; | 665 | result = -ENODEV; | 
| @@ -688,9 +688,7 @@ acpi_battery_write_alarm(struct file *file, | |||
| 688 | acpi_battery_check_result(battery, result); | 688 | acpi_battery_check_result(battery, result); | 
| 689 | 689 | ||
| 690 | if (!result) | 690 | if (!result) | 
| 691 | result = count; | 691 | return count; | 
| 692 | |||
| 693 | mutex_unlock(&battery->mutex); | ||
| 694 | 692 | ||
| 695 | return result; | 693 | return result; | 
| 696 | } | 694 | } | 
| @@ -714,8 +712,6 @@ static int acpi_battery_read(int fid, struct seq_file *seq) | |||
| 714 | int update_result = ACPI_BATTERY_NONE_UPDATE; | 712 | int update_result = ACPI_BATTERY_NONE_UPDATE; | 
| 715 | int update = 0; | 713 | int update = 0; | 
| 716 | 714 | ||
| 717 | mutex_lock(&battery->mutex); | ||
| 718 | |||
| 719 | update = (get_seconds() - battery->update_time[fid] >= update_time); | 715 | update = (get_seconds() - battery->update_time[fid] >= update_time); | 
| 720 | update = (update | battery->flags.update[fid]); | 716 | update = (update | battery->flags.update[fid]); | 
| 721 | 717 | ||
| @@ -733,7 +729,6 @@ static int acpi_battery_read(int fid, struct seq_file *seq) | |||
| 733 | result = acpi_read_funcs[fid].print(seq, result); | 729 | result = acpi_read_funcs[fid].print(seq, result); | 
| 734 | acpi_battery_check_result(battery, result); | 730 | acpi_battery_check_result(battery, result); | 
| 735 | battery->flags.update[fid] = result; | 731 | battery->flags.update[fid] = result; | 
| 736 | mutex_unlock(&battery->mutex); | ||
| 737 | return result; | 732 | return result; | 
| 738 | } | 733 | } | 
| 739 | 734 | ||
| @@ -897,10 +892,7 @@ static int acpi_battery_add(struct acpi_device *device) | |||
| 897 | if (!battery) | 892 | if (!battery) | 
| 898 | return -ENOMEM; | 893 | return -ENOMEM; | 
| 899 | 894 | ||
| 900 | mutex_init(&battery->mutex); | 895 | mutex_init(&battery->lock); | 
| 901 | |||
| 902 | mutex_lock(&battery->mutex); | ||
| 903 | |||
| 904 | battery->device = device; | 896 | battery->device = device; | 
| 905 | strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME); | 897 | strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME); | 
| 906 | strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS); | 898 | strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS); | 
| @@ -936,7 +928,6 @@ static int acpi_battery_add(struct acpi_device *device) | |||
| 936 | kfree(battery); | 928 | kfree(battery); | 
| 937 | } | 929 | } | 
| 938 | 930 | ||
| 939 | mutex_unlock(&battery->mutex); | ||
| 940 | 931 | ||
| 941 | return result; | 932 | return result; | 
| 942 | } | 933 | } | 
| @@ -951,8 +942,6 @@ static int acpi_battery_remove(struct acpi_device *device, int type) | |||
| 951 | 942 | ||
| 952 | battery = acpi_driver_data(device); | 943 | battery = acpi_driver_data(device); | 
| 953 | 944 | ||
| 954 | mutex_lock(&battery->mutex); | ||
| 955 | |||
| 956 | status = acpi_remove_notify_handler(device->handle, | 945 | status = acpi_remove_notify_handler(device->handle, | 
| 957 | ACPI_ALL_NOTIFY, | 946 | ACPI_ALL_NOTIFY, | 
| 958 | acpi_battery_notify); | 947 | acpi_battery_notify); | 
| @@ -963,9 +952,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type) | |||
| 963 | 952 | ||
| 964 | kfree(battery->bst_data.pointer); | 953 | kfree(battery->bst_data.pointer); | 
| 965 | 954 | ||
| 966 | mutex_unlock(&battery->mutex); | 955 | mutex_destroy(&battery->lock); | 
| 967 | |||
| 968 | mutex_destroy(&battery->mutex); | ||
| 969 | 956 | ||
| 970 | kfree(battery); | 957 | kfree(battery); | 
| 971 | 958 | ||
| diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index 5b302c4e293f..a9e3331fee5d 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c | |||
| @@ -52,6 +52,8 @@ ACPI_MODULE_NAME("tbxface") | |||
| 52 | /* Local prototypes */ | 52 | /* Local prototypes */ | 
| 53 | static acpi_status acpi_tb_load_namespace(void); | 53 | static acpi_status acpi_tb_load_namespace(void); | 
| 54 | 54 | ||
| 55 | static int no_auto_ssdt; | ||
| 56 | |||
| 55 | /******************************************************************************* | 57 | /******************************************************************************* | 
| 56 | * | 58 | * | 
| 57 | * FUNCTION: acpi_allocate_root_table | 59 | * FUNCTION: acpi_allocate_root_table | 
| @@ -536,6 +538,10 @@ static acpi_status acpi_tb_load_namespace(void) | |||
| 536 | 538 | ||
| 537 | ACPI_INFO((AE_INFO, "Table DSDT replaced by host OS")); | 539 | ACPI_INFO((AE_INFO, "Table DSDT replaced by host OS")); | 
| 538 | acpi_tb_print_table_header(0, table); | 540 | acpi_tb_print_table_header(0, table); | 
| 541 | |||
| 542 | if (no_auto_ssdt == 0) { | ||
| 543 | printk(KERN_WARNING "ACPI: DSDT override uses original SSDTs unless \"acpi_no_auto_ssdt\""); | ||
| 544 | } | ||
| 539 | } | 545 | } | 
| 540 | 546 | ||
| 541 | status = | 547 | status = | 
| @@ -577,6 +583,11 @@ static acpi_status acpi_tb_load_namespace(void) | |||
| 577 | continue; | 583 | continue; | 
| 578 | } | 584 | } | 
| 579 | 585 | ||
| 586 | if (no_auto_ssdt) { | ||
| 587 | printk(KERN_WARNING "ACPI: SSDT ignored due to \"acpi_no_auto_ssdt\"\n"); | ||
| 588 | continue; | ||
| 589 | } | ||
| 590 | |||
| 580 | /* Ignore errors while loading tables, get as many as possible */ | 591 | /* Ignore errors while loading tables, get as many as possible */ | 
| 581 | 592 | ||
| 582 | (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); | 593 | (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); | 
| @@ -622,3 +633,15 @@ acpi_status acpi_load_tables(void) | |||
| 622 | } | 633 | } | 
| 623 | 634 | ||
| 624 | ACPI_EXPORT_SYMBOL(acpi_load_tables) | 635 | ACPI_EXPORT_SYMBOL(acpi_load_tables) | 
| 636 | |||
| 637 | |||
| 638 | static int __init acpi_no_auto_ssdt_setup(char *s) { | ||
| 639 | |||
| 640 | printk(KERN_NOTICE "ACPI: SSDT auto-load disabled\n"); | ||
| 641 | |||
| 642 | no_auto_ssdt = 1; | ||
| 643 | |||
| 644 | return 1; | ||
| 645 | } | ||
| 646 | |||
| 647 | __setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup); | ||
| diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 73037a4d3c50..aeec67e27264 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
| @@ -1147,10 +1147,15 @@ static int sonypi_acpi_remove(struct acpi_device *device, int type) | |||
| 1147 | return 0; | 1147 | return 0; | 
| 1148 | } | 1148 | } | 
| 1149 | 1149 | ||
| 1150 | const static struct acpi_device_id sonypi_device_ids[] = { | ||
| 1151 | {"SNY6001", 0}, | ||
| 1152 | {"", 0}, | ||
| 1153 | }; | ||
| 1154 | |||
| 1150 | static struct acpi_driver sonypi_acpi_driver = { | 1155 | static struct acpi_driver sonypi_acpi_driver = { | 
| 1151 | .name = "sonypi", | 1156 | .name = "sonypi", | 
| 1152 | .class = "hkey", | 1157 | .class = "hkey", | 
| 1153 | .ids = "SNY6001", | 1158 | .ids = sonypi_device_ids, | 
| 1154 | .ops = { | 1159 | .ops = { | 
| 1155 | .add = sonypi_acpi_add, | 1160 | .add = sonypi_acpi_add, | 
| 1156 | .remove = sonypi_acpi_remove, | 1161 | .remove = sonypi_acpi_remove, | 
| 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 | |||
| 200 | config THINKPAD_ACPI_INPUT_ENABLED | 200 | config 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 | ||
| 213 | endif # MISC_DEVICES | 221 | endif # 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 */ | 
| 848 | struct dmi_system_id sony_nc_ids[] = { | 848 | static 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 | ||
| 251 | struct thinkpad_id_data { | 253 | struct thinkpad_id_data { | 
