aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c60
-rw-r--r--drivers/platform/x86/panasonic-laptop.c28
-rw-r--r--drivers/platform/x86/sony-laptop.c30
-rw-r--r--drivers/platform/x86/wmi.c15
4 files changed, 22 insertions, 111 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 45940f31fe9e..218b9a16ac3f 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -174,8 +174,7 @@ struct fujitsu_hotkey_t {
174 174
175static struct fujitsu_hotkey_t *fujitsu_hotkey; 175static struct fujitsu_hotkey_t *fujitsu_hotkey;
176 176
177static void acpi_fujitsu_hotkey_notify(acpi_handle handle, u32 event, 177static void acpi_fujitsu_hotkey_notify(struct acpi_device *device, u32 event);
178 void *data);
179 178
180#ifdef CONFIG_LEDS_CLASS 179#ifdef CONFIG_LEDS_CLASS
181static enum led_brightness logolamp_get(struct led_classdev *cdev); 180static enum led_brightness logolamp_get(struct led_classdev *cdev);
@@ -203,7 +202,7 @@ struct led_classdev kblamps_led = {
203static u32 dbg_level = 0x03; 202static u32 dbg_level = 0x03;
204#endif 203#endif
205 204
206static void acpi_fujitsu_notify(acpi_handle handle, u32 event, void *data); 205static void acpi_fujitsu_notify(struct acpi_device *device, u32 event);
207 206
208/* Fujitsu ACPI interface function */ 207/* Fujitsu ACPI interface function */
209 208
@@ -658,7 +657,6 @@ static struct dmi_system_id fujitsu_dmi_table[] = {
658 657
659static int acpi_fujitsu_add(struct acpi_device *device) 658static int acpi_fujitsu_add(struct acpi_device *device)
660{ 659{
661 acpi_status status;
662 acpi_handle handle; 660 acpi_handle handle;
663 int result = 0; 661 int result = 0;
664 int state = 0; 662 int state = 0;
@@ -673,20 +671,10 @@ static int acpi_fujitsu_add(struct acpi_device *device)
673 sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS); 671 sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS);
674 device->driver_data = fujitsu; 672 device->driver_data = fujitsu;
675 673
676 status = acpi_install_notify_handler(device->handle,
677 ACPI_DEVICE_NOTIFY,
678 acpi_fujitsu_notify, fujitsu);
679
680 if (ACPI_FAILURE(status)) {
681 printk(KERN_ERR "Error installing notify handler\n");
682 error = -ENODEV;
683 goto err_stop;
684 }
685
686 fujitsu->input = input = input_allocate_device(); 674 fujitsu->input = input = input_allocate_device();
687 if (!input) { 675 if (!input) {
688 error = -ENOMEM; 676 error = -ENOMEM;
689 goto err_uninstall_notify; 677 goto err_stop;
690 } 678 }
691 679
692 snprintf(fujitsu->phys, sizeof(fujitsu->phys), 680 snprintf(fujitsu->phys, sizeof(fujitsu->phys),
@@ -743,9 +731,6 @@ static int acpi_fujitsu_add(struct acpi_device *device)
743end: 731end:
744err_free_input_dev: 732err_free_input_dev:
745 input_free_device(input); 733 input_free_device(input);
746err_uninstall_notify:
747 acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
748 acpi_fujitsu_notify);
749err_stop: 734err_stop:
750 735
751 return result; 736 return result;
@@ -753,7 +738,6 @@ err_stop:
753 738
754static int acpi_fujitsu_remove(struct acpi_device *device, int type) 739static int acpi_fujitsu_remove(struct acpi_device *device, int type)
755{ 740{
756 acpi_status status;
757 struct fujitsu_t *fujitsu = NULL; 741 struct fujitsu_t *fujitsu = NULL;
758 742
759 if (!device || !acpi_driver_data(device)) 743 if (!device || !acpi_driver_data(device))
@@ -761,10 +745,6 @@ static int acpi_fujitsu_remove(struct acpi_device *device, int type)
761 745
762 fujitsu = acpi_driver_data(device); 746 fujitsu = acpi_driver_data(device);
763 747
764 status = acpi_remove_notify_handler(fujitsu->acpi_handle,
765 ACPI_DEVICE_NOTIFY,
766 acpi_fujitsu_notify);
767
768 if (!device || !acpi_driver_data(device)) 748 if (!device || !acpi_driver_data(device))
769 return -EINVAL; 749 return -EINVAL;
770 750
@@ -775,7 +755,7 @@ static int acpi_fujitsu_remove(struct acpi_device *device, int type)
775 755
776/* Brightness notify */ 756/* Brightness notify */
777 757
778static void acpi_fujitsu_notify(acpi_handle handle, u32 event, void *data) 758static void acpi_fujitsu_notify(struct acpi_device *device, u32 event)
779{ 759{
780 struct input_dev *input; 760 struct input_dev *input;
781 int keycode; 761 int keycode;
@@ -829,15 +809,12 @@ static void acpi_fujitsu_notify(acpi_handle handle, u32 event, void *data)
829 input_report_key(input, keycode, 0); 809 input_report_key(input, keycode, 0);
830 input_sync(input); 810 input_sync(input);
831 } 811 }
832
833 return;
834} 812}
835 813
836/* ACPI device for hotkey handling */ 814/* ACPI device for hotkey handling */
837 815
838static int acpi_fujitsu_hotkey_add(struct acpi_device *device) 816static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
839{ 817{
840 acpi_status status;
841 acpi_handle handle; 818 acpi_handle handle;
842 int result = 0; 819 int result = 0;
843 int state = 0; 820 int state = 0;
@@ -854,17 +831,6 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
854 sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS); 831 sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS);
855 device->driver_data = fujitsu_hotkey; 832 device->driver_data = fujitsu_hotkey;
856 833
857 status = acpi_install_notify_handler(device->handle,
858 ACPI_DEVICE_NOTIFY,
859 acpi_fujitsu_hotkey_notify,
860 fujitsu_hotkey);
861
862 if (ACPI_FAILURE(status)) {
863 printk(KERN_ERR "Error installing notify handler\n");
864 error = -ENODEV;
865 goto err_stop;
866 }
867
868 /* kfifo */ 834 /* kfifo */
869 spin_lock_init(&fujitsu_hotkey->fifo_lock); 835 spin_lock_init(&fujitsu_hotkey->fifo_lock);
870 fujitsu_hotkey->fifo = 836 fujitsu_hotkey->fifo =
@@ -879,7 +845,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
879 fujitsu_hotkey->input = input = input_allocate_device(); 845 fujitsu_hotkey->input = input = input_allocate_device();
880 if (!input) { 846 if (!input) {
881 error = -ENOMEM; 847 error = -ENOMEM;
882 goto err_uninstall_notify; 848 goto err_free_fifo;
883 } 849 }
884 850
885 snprintf(fujitsu_hotkey->phys, sizeof(fujitsu_hotkey->phys), 851 snprintf(fujitsu_hotkey->phys, sizeof(fujitsu_hotkey->phys),
@@ -975,9 +941,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
975end: 941end:
976err_free_input_dev: 942err_free_input_dev:
977 input_free_device(input); 943 input_free_device(input);
978err_uninstall_notify: 944err_free_fifo:
979 acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
980 acpi_fujitsu_hotkey_notify);
981 kfifo_free(fujitsu_hotkey->fifo); 945 kfifo_free(fujitsu_hotkey->fifo);
982err_stop: 946err_stop:
983 947
@@ -986,7 +950,6 @@ err_stop:
986 950
987static int acpi_fujitsu_hotkey_remove(struct acpi_device *device, int type) 951static int acpi_fujitsu_hotkey_remove(struct acpi_device *device, int type)
988{ 952{
989 acpi_status status;
990 struct fujitsu_hotkey_t *fujitsu_hotkey = NULL; 953 struct fujitsu_hotkey_t *fujitsu_hotkey = NULL;
991 954
992 if (!device || !acpi_driver_data(device)) 955 if (!device || !acpi_driver_data(device))
@@ -994,10 +957,6 @@ static int acpi_fujitsu_hotkey_remove(struct acpi_device *device, int type)
994 957
995 fujitsu_hotkey = acpi_driver_data(device); 958 fujitsu_hotkey = acpi_driver_data(device);
996 959
997 status = acpi_remove_notify_handler(fujitsu_hotkey->acpi_handle,
998 ACPI_DEVICE_NOTIFY,
999 acpi_fujitsu_hotkey_notify);
1000
1001 fujitsu_hotkey->acpi_handle = NULL; 960 fujitsu_hotkey->acpi_handle = NULL;
1002 961
1003 kfifo_free(fujitsu_hotkey->fifo); 962 kfifo_free(fujitsu_hotkey->fifo);
@@ -1005,8 +964,7 @@ static int acpi_fujitsu_hotkey_remove(struct acpi_device *device, int type)
1005 return 0; 964 return 0;
1006} 965}
1007 966
1008static void acpi_fujitsu_hotkey_notify(acpi_handle handle, u32 event, 967static void acpi_fujitsu_hotkey_notify(struct acpi_device *device, u32 event)
1009 void *data)
1010{ 968{
1011 struct input_dev *input; 969 struct input_dev *input;
1012 int keycode, keycode_r; 970 int keycode, keycode_r;
@@ -1089,8 +1047,6 @@ static void acpi_fujitsu_hotkey_notify(acpi_handle handle, u32 event,
1089 input_sync(input); 1047 input_sync(input);
1090 break; 1048 break;
1091 } 1049 }
1092
1093 return;
1094} 1050}
1095 1051
1096/* Initialization */ 1052/* Initialization */
@@ -1107,6 +1063,7 @@ static struct acpi_driver acpi_fujitsu_driver = {
1107 .ops = { 1063 .ops = {
1108 .add = acpi_fujitsu_add, 1064 .add = acpi_fujitsu_add,
1109 .remove = acpi_fujitsu_remove, 1065 .remove = acpi_fujitsu_remove,
1066 .notify = acpi_fujitsu_notify,
1110 }, 1067 },
1111}; 1068};
1112 1069
@@ -1122,6 +1079,7 @@ static struct acpi_driver acpi_fujitsu_hotkey_driver = {
1122 .ops = { 1079 .ops = {
1123 .add = acpi_fujitsu_hotkey_add, 1080 .add = acpi_fujitsu_hotkey_add,
1124 .remove = acpi_fujitsu_hotkey_remove, 1081 .remove = acpi_fujitsu_hotkey_remove,
1082 .notify = acpi_fujitsu_hotkey_notify,
1125 }, 1083 },
1126}; 1084};
1127 1085
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
index a5ce4bc202e3..fe7cf0188acc 100644
--- a/drivers/platform/x86/panasonic-laptop.c
+++ b/drivers/platform/x86/panasonic-laptop.c
@@ -176,6 +176,7 @@ enum SINF_BITS { SINF_NUM_BATTERIES = 0,
176static int acpi_pcc_hotkey_add(struct acpi_device *device); 176static int acpi_pcc_hotkey_add(struct acpi_device *device);
177static int acpi_pcc_hotkey_remove(struct acpi_device *device, int type); 177static int acpi_pcc_hotkey_remove(struct acpi_device *device, int type);
178static int acpi_pcc_hotkey_resume(struct acpi_device *device); 178static int acpi_pcc_hotkey_resume(struct acpi_device *device);
179static void acpi_pcc_hotkey_notify(struct acpi_device *device, u32 event);
179 180
180static const struct acpi_device_id pcc_device_ids[] = { 181static const struct acpi_device_id pcc_device_ids[] = {
181 { "MAT0012", 0}, 182 { "MAT0012", 0},
@@ -194,6 +195,7 @@ static struct acpi_driver acpi_pcc_driver = {
194 .add = acpi_pcc_hotkey_add, 195 .add = acpi_pcc_hotkey_add,
195 .remove = acpi_pcc_hotkey_remove, 196 .remove = acpi_pcc_hotkey_remove,
196 .resume = acpi_pcc_hotkey_resume, 197 .resume = acpi_pcc_hotkey_resume,
198 .notify = acpi_pcc_hotkey_notify,
197 }, 199 },
198}; 200};
199 201
@@ -271,7 +273,7 @@ static int acpi_pcc_retrieve_biosdata(struct pcc_acpi *pcc, u32 *sinf)
271 union acpi_object *hkey = NULL; 273 union acpi_object *hkey = NULL;
272 int i; 274 int i;
273 275
274 status = acpi_evaluate_object(pcc->handle, METHOD_HKEY_SINF, 0, 276 status = acpi_evaluate_object(pcc->handle, METHOD_HKEY_SINF, NULL,
275 &buffer); 277 &buffer);
276 if (ACPI_FAILURE(status)) { 278 if (ACPI_FAILURE(status)) {
277 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 279 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
@@ -527,9 +529,9 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
527 return; 529 return;
528} 530}
529 531
530static void acpi_pcc_hotkey_notify(acpi_handle handle, u32 event, void *data) 532static void acpi_pcc_hotkey_notify(struct acpi_device *device, u32 event)
531{ 533{
532 struct pcc_acpi *pcc = (struct pcc_acpi *) data; 534 struct pcc_acpi *pcc = acpi_driver_data(device);
533 535
534 switch (event) { 536 switch (event) {
535 case HKEY_NOTIFY: 537 case HKEY_NOTIFY:
@@ -599,7 +601,6 @@ static int acpi_pcc_hotkey_resume(struct acpi_device *device)
599 601
600static int acpi_pcc_hotkey_add(struct acpi_device *device) 602static int acpi_pcc_hotkey_add(struct acpi_device *device)
601{ 603{
602 acpi_status status;
603 struct pcc_acpi *pcc; 604 struct pcc_acpi *pcc;
604 int num_sifr, result; 605 int num_sifr, result;
605 606
@@ -640,22 +641,11 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)
640 goto out_sinf; 641 goto out_sinf;
641 } 642 }
642 643
643 /* initialize hotkey input device */
644 status = acpi_install_notify_handler(pcc->handle, ACPI_DEVICE_NOTIFY,
645 acpi_pcc_hotkey_notify, pcc);
646
647 if (ACPI_FAILURE(status)) {
648 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
649 "Error installing notify handler\n"));
650 result = -ENODEV;
651 goto out_input;
652 }
653
654 /* initialize backlight */ 644 /* initialize backlight */
655 pcc->backlight = backlight_device_register("panasonic", NULL, pcc, 645 pcc->backlight = backlight_device_register("panasonic", NULL, pcc,
656 &pcc_backlight_ops); 646 &pcc_backlight_ops);
657 if (IS_ERR(pcc->backlight)) 647 if (IS_ERR(pcc->backlight))
658 goto out_notify; 648 goto out_input;
659 649
660 if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf)) { 650 if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf)) {
661 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 651 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
@@ -680,9 +670,6 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device)
680 670
681out_backlight: 671out_backlight:
682 backlight_device_unregister(pcc->backlight); 672 backlight_device_unregister(pcc->backlight);
683out_notify:
684 acpi_remove_notify_handler(pcc->handle, ACPI_DEVICE_NOTIFY,
685 acpi_pcc_hotkey_notify);
686out_input: 673out_input:
687 input_unregister_device(pcc->input_dev); 674 input_unregister_device(pcc->input_dev);
688 /* no need to input_free_device() since core input API refcount and 675 /* no need to input_free_device() since core input API refcount and
@@ -723,9 +710,6 @@ static int acpi_pcc_hotkey_remove(struct acpi_device *device, int type)
723 710
724 backlight_device_unregister(pcc->backlight); 711 backlight_device_unregister(pcc->backlight);
725 712
726 acpi_remove_notify_handler(pcc->handle, ACPI_DEVICE_NOTIFY,
727 acpi_pcc_hotkey_notify);
728
729 input_unregister_device(pcc->input_dev); 713 input_unregister_device(pcc->input_dev);
730 /* no need to input_free_device() since core input API refcount and 714 /* no need to input_free_device() since core input API refcount and
731 * free()s the device */ 715 * free()s the device */
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index a90ec5cb2f20..d3c92d777bde 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -914,7 +914,7 @@ static struct sony_nc_event sony_127_events[] = {
914/* 914/*
915 * ACPI callbacks 915 * ACPI callbacks
916 */ 916 */
917static void sony_acpi_notify(acpi_handle handle, u32 event, void *data) 917static void sony_nc_notify(struct acpi_device *device, u32 event)
918{ 918{
919 u32 ev = event; 919 u32 ev = event;
920 920
@@ -933,7 +933,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
933 struct sony_nc_event *key_event; 933 struct sony_nc_event *key_event;
934 934
935 if (sony_call_snc_handle(key_handle, 0x200, &result)) { 935 if (sony_call_snc_handle(key_handle, 0x200, &result)) {
936 dprintk("sony_acpi_notify, unable to decode" 936 dprintk("sony_nc_notify, unable to decode"
937 " event 0x%.2x 0x%.2x\n", key_handle, 937 " event 0x%.2x 0x%.2x\n", key_handle,
938 ev); 938 ev);
939 /* restore the original event */ 939 /* restore the original event */
@@ -968,7 +968,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
968 } else 968 } else
969 sony_laptop_report_input_event(ev); 969 sony_laptop_report_input_event(ev);
970 970
971 dprintk("sony_acpi_notify, event: 0x%.2x\n", ev); 971 dprintk("sony_nc_notify, event: 0x%.2x\n", ev);
972 acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev); 972 acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev);
973} 973}
974 974
@@ -1276,15 +1276,6 @@ static int sony_nc_add(struct acpi_device *device)
1276 goto outwalk; 1276 goto outwalk;
1277 } 1277 }
1278 1278
1279 status = acpi_install_notify_handler(sony_nc_acpi_handle,
1280 ACPI_DEVICE_NOTIFY,
1281 sony_acpi_notify, NULL);
1282 if (ACPI_FAILURE(status)) {
1283 printk(KERN_WARNING DRV_PFX "unable to install notify handler (%u)\n", status);
1284 result = -ENODEV;
1285 goto outinput;
1286 }
1287
1288 if (acpi_video_backlight_support()) { 1279 if (acpi_video_backlight_support()) {
1289 printk(KERN_INFO DRV_PFX "brightness ignored, must be " 1280 printk(KERN_INFO DRV_PFX "brightness ignored, must be "
1290 "controlled by ACPI video driver\n"); 1281 "controlled by ACPI video driver\n");
@@ -1362,13 +1353,6 @@ static int sony_nc_add(struct acpi_device *device)
1362 if (sony_backlight_device) 1353 if (sony_backlight_device)
1363 backlight_device_unregister(sony_backlight_device); 1354 backlight_device_unregister(sony_backlight_device);
1364 1355
1365 status = acpi_remove_notify_handler(sony_nc_acpi_handle,
1366 ACPI_DEVICE_NOTIFY,
1367 sony_acpi_notify);
1368 if (ACPI_FAILURE(status))
1369 printk(KERN_WARNING DRV_PFX "unable to remove notify handler\n");
1370
1371 outinput:
1372 sony_laptop_remove_input(); 1356 sony_laptop_remove_input();
1373 1357
1374 outwalk: 1358 outwalk:
@@ -1378,7 +1362,6 @@ static int sony_nc_add(struct acpi_device *device)
1378 1362
1379static int sony_nc_remove(struct acpi_device *device, int type) 1363static int sony_nc_remove(struct acpi_device *device, int type)
1380{ 1364{
1381 acpi_status status;
1382 struct sony_nc_value *item; 1365 struct sony_nc_value *item;
1383 1366
1384 if (sony_backlight_device) 1367 if (sony_backlight_device)
@@ -1386,12 +1369,6 @@ static int sony_nc_remove(struct acpi_device *device, int type)
1386 1369
1387 sony_nc_acpi_device = NULL; 1370 sony_nc_acpi_device = NULL;
1388 1371
1389 status = acpi_remove_notify_handler(sony_nc_acpi_handle,
1390 ACPI_DEVICE_NOTIFY,
1391 sony_acpi_notify);
1392 if (ACPI_FAILURE(status))
1393 printk(KERN_WARNING DRV_PFX "unable to remove notify handler\n");
1394
1395 for (item = sony_nc_values; item->name; ++item) { 1372 for (item = sony_nc_values; item->name; ++item) {
1396 device_remove_file(&sony_pf_device->dev, &item->devattr); 1373 device_remove_file(&sony_pf_device->dev, &item->devattr);
1397 } 1374 }
@@ -1425,6 +1402,7 @@ static struct acpi_driver sony_nc_driver = {
1425 .add = sony_nc_add, 1402 .add = sony_nc_add,
1426 .remove = sony_nc_remove, 1403 .remove = sony_nc_remove,
1427 .resume = sony_nc_resume, 1404 .resume = sony_nc_resume,
1405 .notify = sony_nc_notify,
1428 }, 1406 },
1429}; 1407};
1430 1408
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 2f269e117b8f..043b208d971d 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -81,6 +81,7 @@ static struct wmi_block wmi_blocks;
81 81
82static int acpi_wmi_remove(struct acpi_device *device, int type); 82static int acpi_wmi_remove(struct acpi_device *device, int type);
83static int acpi_wmi_add(struct acpi_device *device); 83static int acpi_wmi_add(struct acpi_device *device);
84static void acpi_wmi_notify(struct acpi_device *device, u32 event);
84 85
85static const struct acpi_device_id wmi_device_ids[] = { 86static const struct acpi_device_id wmi_device_ids[] = {
86 {"PNP0C14", 0}, 87 {"PNP0C14", 0},
@@ -96,6 +97,7 @@ static struct acpi_driver acpi_wmi_driver = {
96 .ops = { 97 .ops = {
97 .add = acpi_wmi_add, 98 .add = acpi_wmi_add,
98 .remove = acpi_wmi_remove, 99 .remove = acpi_wmi_remove,
100 .notify = acpi_wmi_notify,
99 }, 101 },
100}; 102};
101 103
@@ -643,12 +645,11 @@ acpi_wmi_ec_space_handler(u32 function, acpi_physical_address address,
643 } 645 }
644} 646}
645 647
646static void acpi_wmi_notify(acpi_handle handle, u32 event, void *data) 648static void acpi_wmi_notify(struct acpi_device *device, u32 event)
647{ 649{
648 struct guid_block *block; 650 struct guid_block *block;
649 struct wmi_block *wblock; 651 struct wmi_block *wblock;
650 struct list_head *p; 652 struct list_head *p;
651 struct acpi_device *device = data;
652 653
653 list_for_each(p, &wmi_blocks.list) { 654 list_for_each(p, &wmi_blocks.list) {
654 wblock = list_entry(p, struct wmi_block, list); 655 wblock = list_entry(p, struct wmi_block, list);
@@ -669,9 +670,6 @@ static void acpi_wmi_notify(acpi_handle handle, u32 event, void *data)
669 670
670static int acpi_wmi_remove(struct acpi_device *device, int type) 671static int acpi_wmi_remove(struct acpi_device *device, int type)
671{ 672{
672 acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
673 acpi_wmi_notify);
674
675 acpi_remove_address_space_handler(device->handle, 673 acpi_remove_address_space_handler(device->handle,
676 ACPI_ADR_SPACE_EC, &acpi_wmi_ec_space_handler); 674 ACPI_ADR_SPACE_EC, &acpi_wmi_ec_space_handler);
677 675
@@ -683,13 +681,6 @@ static int __init acpi_wmi_add(struct acpi_device *device)
683 acpi_status status; 681 acpi_status status;
684 int result = 0; 682 int result = 0;
685 683
686 status = acpi_install_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
687 acpi_wmi_notify, device);
688 if (ACPI_FAILURE(status)) {
689 printk(KERN_ERR PREFIX "Error installing notify handler\n");
690 return -ENODEV;
691 }
692
693 status = acpi_install_address_space_handler(device->handle, 684 status = acpi_install_address_space_handler(device->handle,
694 ACPI_ADR_SPACE_EC, 685 ACPI_ADR_SPACE_EC,
695 &acpi_wmi_ec_space_handler, 686 &acpi_wmi_ec_space_handler,