aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/hotkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/hotkey.c')
-rw-r--r--drivers/acpi/hotkey.c132
1 files changed, 45 insertions, 87 deletions
diff --git a/drivers/acpi/hotkey.c b/drivers/acpi/hotkey.c
index c25b2b92edcf..fd81a0f5222f 100644
--- a/drivers/acpi/hotkey.c
+++ b/drivers/acpi/hotkey.c
@@ -231,11 +231,10 @@ struct list_head hotkey_entries; /* head of the list of hotkey_list */
231 231
232static int hotkey_info_seq_show(struct seq_file *seq, void *offset) 232static int hotkey_info_seq_show(struct seq_file *seq, void *offset)
233{ 233{
234 ACPI_FUNCTION_TRACE("hotkey_info_seq_show");
235 234
236 seq_printf(seq, "Hotkey generic driver ver: %s\n", HOTKEY_ACPI_VERSION); 235 seq_printf(seq, "Hotkey generic driver ver: %s\n", HOTKEY_ACPI_VERSION);
237 236
238 return_VALUE(0); 237 return 0;
239} 238}
240 239
241static int hotkey_info_open_fs(struct inode *inode, struct file *file) 240static int hotkey_info_open_fs(struct inode *inode, struct file *file)
@@ -266,7 +265,6 @@ static int hotkey_polling_seq_show(struct seq_file *seq, void *offset)
266 (struct acpi_polling_hotkey *)seq->private; 265 (struct acpi_polling_hotkey *)seq->private;
267 char *buf; 266 char *buf;
268 267
269 ACPI_FUNCTION_TRACE("hotkey_polling_seq_show");
270 268
271 if (poll_hotkey->poll_result) { 269 if (poll_hotkey->poll_result) {
272 buf = format_result(poll_hotkey->poll_result); 270 buf = format_result(poll_hotkey->poll_result);
@@ -274,7 +272,7 @@ static int hotkey_polling_seq_show(struct seq_file *seq, void *offset)
274 seq_printf(seq, "%s", buf); 272 seq_printf(seq, "%s", buf);
275 kfree(buf); 273 kfree(buf);
276 } 274 }
277 return_VALUE(0); 275 return 0;
278} 276}
279 277
280static int hotkey_polling_open_fs(struct inode *inode, struct file *file) 278static int hotkey_polling_open_fs(struct inode *inode, struct file *file)
@@ -293,7 +291,6 @@ static int hotkey_get_internal_event(int event, struct acpi_hotkey_list *list)
293 struct list_head *entries; 291 struct list_head *entries;
294 int val = -1; 292 int val = -1;
295 293
296 ACPI_FUNCTION_TRACE("hotkey_get_internal_event");
297 294
298 list_for_each(entries, list->entries) { 295 list_for_each(entries, list->entries) {
299 union acpi_hotkey *key = 296 union acpi_hotkey *key =
@@ -305,7 +302,7 @@ static int hotkey_get_internal_event(int event, struct acpi_hotkey_list *list)
305 } 302 }
306 } 303 }
307 304
308 return_VALUE(val); 305 return val;
309} 306}
310 307
311static void 308static void
@@ -314,15 +311,14 @@ acpi_hotkey_notify_handler(acpi_handle handle, u32 event, void *data)
314 struct acpi_device *device = NULL; 311 struct acpi_device *device = NULL;
315 u32 internal_event; 312 u32 internal_event;
316 313
317 ACPI_FUNCTION_TRACE("acpi_hotkey_notify_handler");
318 314
319 if (acpi_bus_get_device(handle, &device)) 315 if (acpi_bus_get_device(handle, &device))
320 return_VOID; 316 return;
321 317
322 internal_event = hotkey_get_internal_event(event, &global_hotkey_list); 318 internal_event = hotkey_get_internal_event(event, &global_hotkey_list);
323 acpi_bus_generate_event(device, internal_event, 0); 319 acpi_bus_generate_event(device, internal_event, 0);
324 320
325 return_VOID; 321 return;
326} 322}
327 323
328/* Need to invent automatically hotkey add method */ 324/* Need to invent automatically hotkey add method */
@@ -346,7 +342,6 @@ static int create_polling_proc(union acpi_hotkey *device)
346 char proc_name[80]; 342 char proc_name[80];
347 mode_t mode; 343 mode_t mode;
348 344
349 ACPI_FUNCTION_TRACE("create_polling_proc");
350 mode = S_IFREG | S_IRUGO | S_IWUGO; 345 mode = S_IFREG | S_IRUGO | S_IWUGO;
351 346
352 sprintf(proc_name, "%d", device->link.hotkey_standard_num); 347 sprintf(proc_name, "%d", device->link.hotkey_standard_num);
@@ -356,10 +351,7 @@ static int create_polling_proc(union acpi_hotkey *device)
356 proc = create_proc_entry(proc_name, mode, hotkey_proc_dir); 351 proc = create_proc_entry(proc_name, mode, hotkey_proc_dir);
357 352
358 if (!proc) { 353 if (!proc) {
359 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 354 return -ENODEV;
360 "Hotkey: Unable to create %s entry\n",
361 device->poll_hotkey.poll_method));
362 return_VALUE(-ENODEV);
363 } else { 355 } else {
364 proc->proc_fops = &hotkey_polling_fops; 356 proc->proc_fops = &hotkey_polling_fops;
365 proc->owner = THIS_MODULE; 357 proc->owner = THIS_MODULE;
@@ -368,7 +360,7 @@ static int create_polling_proc(union acpi_hotkey *device)
368 proc->gid = 0; 360 proc->gid = 0;
369 device->poll_hotkey.proc = proc; 361 device->poll_hotkey.proc = proc;
370 } 362 }
371 return_VALUE(0); 363 return 0;
372} 364}
373 365
374static int hotkey_add(union acpi_hotkey *device) 366static int hotkey_add(union acpi_hotkey *device)
@@ -376,7 +368,6 @@ static int hotkey_add(union acpi_hotkey *device)
376 int status = 0; 368 int status = 0;
377 struct acpi_device *dev = NULL; 369 struct acpi_device *dev = NULL;
378 370
379 ACPI_FUNCTION_TRACE("hotkey_add");
380 371
381 if (device->link.hotkey_type == ACPI_HOTKEY_EVENT) { 372 if (device->link.hotkey_type == ACPI_HOTKEY_EVENT) {
382 acpi_bus_get_device(device->event_hotkey.bus_handle, &dev); 373 acpi_bus_get_device(device->event_hotkey.bus_handle, &dev);
@@ -391,14 +382,13 @@ static int hotkey_add(union acpi_hotkey *device)
391 382
392 list_add_tail(&device->link.entries, global_hotkey_list.entries); 383 list_add_tail(&device->link.entries, global_hotkey_list.entries);
393 384
394 return_VALUE(status); 385 return status;
395} 386}
396 387
397static int hotkey_remove(union acpi_hotkey *device) 388static int hotkey_remove(union acpi_hotkey *device)
398{ 389{
399 struct list_head *entries, *next; 390 struct list_head *entries, *next;
400 391
401 ACPI_FUNCTION_TRACE("hotkey_remove");
402 392
403 list_for_each_safe(entries, next, global_hotkey_list.entries) { 393 list_for_each_safe(entries, next, global_hotkey_list.entries) {
404 union acpi_hotkey *key = 394 union acpi_hotkey *key =
@@ -412,14 +402,13 @@ static int hotkey_remove(union acpi_hotkey *device)
412 } 402 }
413 } 403 }
414 kfree(device); 404 kfree(device);
415 return_VALUE(0); 405 return 0;
416} 406}
417 407
418static int hotkey_update(union acpi_hotkey *key) 408static int hotkey_update(union acpi_hotkey *key)
419{ 409{
420 struct list_head *entries; 410 struct list_head *entries;
421 411
422 ACPI_FUNCTION_TRACE("hotkey_update");
423 412
424 list_for_each(entries, global_hotkey_list.entries) { 413 list_for_each(entries, global_hotkey_list.entries) {
425 union acpi_hotkey *tmp = 414 union acpi_hotkey *tmp =
@@ -461,19 +450,18 @@ static int hotkey_update(union acpi_hotkey *key)
461 */ 450 */
462 kfree(key); 451 kfree(key);
463 } 452 }
464 return_VALUE(0); 453 return 0;
465 break; 454 break;
466 } 455 }
467 } 456 }
468 457
469 return_VALUE(-ENODEV); 458 return -ENODEV;
470} 459}
471 460
472static void free_hotkey_device(union acpi_hotkey *key) 461static void free_hotkey_device(union acpi_hotkey *key)
473{ 462{
474 struct acpi_device *dev; 463 struct acpi_device *dev;
475 464
476 ACPI_FUNCTION_TRACE("free_hotkey_device");
477 465
478 if (key->link.hotkey_type == ACPI_HOTKEY_EVENT) { 466 if (key->link.hotkey_type == ACPI_HOTKEY_EVENT) {
479 acpi_bus_get_device(key->event_hotkey.bus_handle, &dev); 467 acpi_bus_get_device(key->event_hotkey.bus_handle, &dev);
@@ -493,7 +481,7 @@ static void free_hotkey_device(union acpi_hotkey *key)
493 free_poll_hotkey_buffer(key); 481 free_poll_hotkey_buffer(key);
494 } 482 }
495 kfree(key); 483 kfree(key);
496 return_VOID; 484 return;
497} 485}
498 486
499static void free_hotkey_buffer(union acpi_hotkey *key) 487static void free_hotkey_buffer(union acpi_hotkey *key)
@@ -514,7 +502,6 @@ init_hotkey_device(union acpi_hotkey *key, char *bus_str, char *action_str,
514 acpi_handle tmp_handle; 502 acpi_handle tmp_handle;
515 acpi_status status = AE_OK; 503 acpi_status status = AE_OK;
516 504
517 ACPI_FUNCTION_TRACE("init_hotkey_device");
518 505
519 if (std_num < 0 || IS_POLL(std_num) || !key) 506 if (std_num < 0 || IS_POLL(std_num) || !key)
520 goto do_fail; 507 goto do_fail;
@@ -541,9 +528,9 @@ init_hotkey_device(union acpi_hotkey *key, char *bus_str, char *action_str,
541 method, &tmp_handle); 528 method, &tmp_handle);
542 if (ACPI_FAILURE(status)) 529 if (ACPI_FAILURE(status))
543 goto do_fail; 530 goto do_fail;
544 return_VALUE(AE_OK); 531 return AE_OK;
545 do_fail: 532 do_fail:
546 return_VALUE(-ENODEV); 533 return -ENODEV;
547} 534}
548 535
549static int 536static int
@@ -555,7 +542,6 @@ init_poll_hotkey_device(union acpi_hotkey *key,
555 acpi_status status = AE_OK; 542 acpi_status status = AE_OK;
556 acpi_handle tmp_handle; 543 acpi_handle tmp_handle;
557 544
558 ACPI_FUNCTION_TRACE("init_poll_hotkey_device");
559 545
560 if (std_num < 0 || IS_EVENT(std_num) || !key) 546 if (std_num < 0 || IS_EVENT(std_num) || !key)
561 goto do_fail; 547 goto do_fail;
@@ -590,22 +576,20 @@ init_poll_hotkey_device(union acpi_hotkey *key,
590 (union acpi_object *)kmalloc(sizeof(union acpi_object), GFP_KERNEL); 576 (union acpi_object *)kmalloc(sizeof(union acpi_object), GFP_KERNEL);
591 if (!key->poll_hotkey.poll_result) 577 if (!key->poll_hotkey.poll_result)
592 goto do_fail; 578 goto do_fail;
593 return_VALUE(AE_OK); 579 return AE_OK;
594 do_fail: 580 do_fail:
595 return_VALUE(-ENODEV); 581 return -ENODEV;
596} 582}
597 583
598static int hotkey_open_config(struct inode *inode, struct file *file) 584static int hotkey_open_config(struct inode *inode, struct file *file)
599{ 585{
600 ACPI_FUNCTION_TRACE("hotkey_open_config"); 586 return (single_open
601 return_VALUE(single_open
602 (file, hotkey_config_seq_show, PDE(inode)->data)); 587 (file, hotkey_config_seq_show, PDE(inode)->data));
603} 588}
604 589
605static int hotkey_poll_open_config(struct inode *inode, struct file *file) 590static int hotkey_poll_open_config(struct inode *inode, struct file *file)
606{ 591{
607 ACPI_FUNCTION_TRACE("hotkey_poll_open_config"); 592 return (single_open
608 return_VALUE(single_open
609 (file, hotkey_poll_config_seq_show, PDE(inode)->data)); 593 (file, hotkey_poll_config_seq_show, PDE(inode)->data));
610} 594}
611 595
@@ -618,7 +602,6 @@ static int hotkey_config_seq_show(struct seq_file *seq, void *offset)
618 struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name }; 602 struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name };
619 struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name }; 603 struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name };
620 604
621 ACPI_FUNCTION_TRACE(("hotkey_config_seq_show"));
622 605
623 list_for_each(entries, hotkey_list->entries) { 606 list_for_each(entries, hotkey_list->entries) {
624 union acpi_hotkey *key = 607 union acpi_hotkey *key =
@@ -636,7 +619,7 @@ static int hotkey_config_seq_show(struct seq_file *seq, void *offset)
636 } 619 }
637 } 620 }
638 seq_puts(seq, "\n"); 621 seq_puts(seq, "\n");
639 return_VALUE(0); 622 return 0;
640} 623}
641 624
642static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset) 625static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset)
@@ -648,7 +631,6 @@ static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset)
648 struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name }; 631 struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name };
649 struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name }; 632 struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name };
650 633
651 ACPI_FUNCTION_TRACE(("hotkey_config_seq_show"));
652 634
653 list_for_each(entries, hotkey_list->entries) { 635 list_for_each(entries, hotkey_list->entries) {
654 union acpi_hotkey *key = 636 union acpi_hotkey *key =
@@ -666,7 +648,7 @@ static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset)
666 } 648 }
667 } 649 }
668 seq_puts(seq, "\n"); 650 seq_puts(seq, "\n");
669 return_VALUE(0); 651 return 0;
670} 652}
671 653
672static int 654static int
@@ -678,7 +660,6 @@ get_parms(char *config_record,
678 char **method, int *internal_event_num, int *external_event_num) 660 char **method, int *internal_event_num, int *external_event_num)
679{ 661{
680 char *tmp, *tmp1, count; 662 char *tmp, *tmp1, count;
681 ACPI_FUNCTION_TRACE(("get_parms"));
682 663
683 sscanf(config_record, "%d", cmd); 664 sscanf(config_record, "%d", cmd);
684 665
@@ -744,9 +725,9 @@ get_parms(char *config_record,
744 0) 725 0)
745 goto do_fail; 726 goto do_fail;
746 727
747 return_VALUE(6); 728 return 6;
748 do_fail: 729 do_fail:
749 return_VALUE(-1); 730 return -1;
750} 731}
751 732
752/* count is length for one input record */ 733/* count is length for one input record */
@@ -763,16 +744,15 @@ static ssize_t hotkey_write_config(struct file *file,
763 int ret = 0; 744 int ret = 0;
764 union acpi_hotkey *key = NULL; 745 union acpi_hotkey *key = NULL;
765 746
766 ACPI_FUNCTION_TRACE(("hotkey_write_config"));
767 747
768 config_record = (char *)kmalloc(count + 1, GFP_KERNEL); 748 config_record = (char *)kmalloc(count + 1, GFP_KERNEL);
769 if (!config_record) 749 if (!config_record)
770 return_VALUE(-ENOMEM); 750 return -ENOMEM;
771 751
772 if (copy_from_user(config_record, buffer, count)) { 752 if (copy_from_user(config_record, buffer, count)) {
773 kfree(config_record); 753 kfree(config_record);
774 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data \n")); 754 printk(KERN_ERR PREFIX "Invalid data\n");
775 return_VALUE(-EINVAL); 755 return -EINVAL;
776 } 756 }
777 config_record[count] = 0; 757 config_record[count] = 0;
778 758
@@ -792,9 +772,8 @@ static ssize_t hotkey_write_config(struct file *file,
792 kfree(bus_method); 772 kfree(bus_method);
793 kfree(action_handle); 773 kfree(action_handle);
794 kfree(method); 774 kfree(method);
795 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 775 printk(KERN_ERR PREFIX "Invalid data format ret=%d\n", ret);
796 "Invalid data format ret=%d\n", ret)); 776 return -EINVAL;
797 return_VALUE(-EINVAL);
798 } 777 }
799 778
800 key = kmalloc(sizeof(union acpi_hotkey), GFP_KERNEL); 779 key = kmalloc(sizeof(union acpi_hotkey), GFP_KERNEL);
@@ -806,7 +785,7 @@ static ssize_t hotkey_write_config(struct file *file,
806 tmp = get_hotkey_by_event(&global_hotkey_list, 785 tmp = get_hotkey_by_event(&global_hotkey_list,
807 internal_event_num); 786 internal_event_num);
808 if (!tmp) 787 if (!tmp)
809 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid key")); 788 printk(KERN_ERR PREFIX "Invalid key\n");
810 else 789 else
811 memcpy(key, tmp, sizeof(union acpi_hotkey)); 790 memcpy(key, tmp, sizeof(union acpi_hotkey));
812 goto cont_cmd; 791 goto cont_cmd;
@@ -828,8 +807,8 @@ static ssize_t hotkey_write_config(struct file *file,
828 else 807 else
829 free_poll_hotkey_buffer(key); 808 free_poll_hotkey_buffer(key);
830 kfree(key); 809 kfree(key);
831 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid hotkey \n")); 810 printk(KERN_ERR PREFIX "Invalid hotkey\n");
832 return_VALUE(-EINVAL); 811 return -EINVAL;
833 } 812 }
834 813
835 cont_cmd: 814 cont_cmd:
@@ -855,15 +834,15 @@ static ssize_t hotkey_write_config(struct file *file,
855 goto fail_out; 834 goto fail_out;
856 break; 835 break;
857 } 836 }
858 return_VALUE(count); 837 return count;
859 fail_out: 838 fail_out:
860 if (IS_EVENT(internal_event_num)) 839 if (IS_EVENT(internal_event_num))
861 free_hotkey_buffer(key); 840 free_hotkey_buffer(key);
862 else 841 else
863 free_poll_hotkey_buffer(key); 842 free_poll_hotkey_buffer(key);
864 kfree(key); 843 kfree(key);
865 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid key\n")); 844 printk(KERN_ERR PREFIX "invalid key\n");
866 return_VALUE(-EINVAL); 845 return -EINVAL;
867} 846}
868 847
869/* 848/*
@@ -880,7 +859,6 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val,
880 union acpi_object in_obj; /* the only param we use */ 859 union acpi_object in_obj; /* the only param we use */
881 acpi_status status; 860 acpi_status status;
882 861
883 ACPI_FUNCTION_TRACE("write_acpi_int");
884 params.count = 1; 862 params.count = 1;
885 params.pointer = &in_obj; 863 params.pointer = &in_obj;
886 in_obj.type = ACPI_TYPE_INTEGER; 864 in_obj.type = ACPI_TYPE_INTEGER;
@@ -888,7 +866,7 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val,
888 866
889 status = acpi_evaluate_object(handle, (char *)method, &params, output); 867 status = acpi_evaluate_object(handle, (char *)method, &params, output);
890 868
891 return_VALUE(status == AE_OK); 869 return (status == AE_OK);
892} 870}
893 871
894static int read_acpi_int(acpi_handle handle, const char *method, 872static int read_acpi_int(acpi_handle handle, const char *method,
@@ -898,7 +876,6 @@ static int read_acpi_int(acpi_handle handle, const char *method,
898 union acpi_object out_obj; 876 union acpi_object out_obj;
899 acpi_status status; 877 acpi_status status;
900 878
901 ACPI_FUNCTION_TRACE("read_acpi_int");
902 output.length = sizeof(out_obj); 879 output.length = sizeof(out_obj);
903 output.pointer = &out_obj; 880 output.pointer = &out_obj;
904 881
@@ -907,8 +884,8 @@ static int read_acpi_int(acpi_handle handle, const char *method,
907 val->integer.value = out_obj.integer.value; 884 val->integer.value = out_obj.integer.value;
908 val->type = out_obj.type; 885 val->type = out_obj.type;
909 } else 886 } else
910 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "null val pointer")); 887 printk(KERN_ERR PREFIX "null val pointer\n");
911 return_VALUE((status == AE_OK) 888 return ((status == AE_OK)
912 && (out_obj.type == ACPI_TYPE_INTEGER)); 889 && (out_obj.type == ACPI_TYPE_INTEGER));
913} 890}
914 891
@@ -945,24 +922,23 @@ static ssize_t hotkey_execute_aml_method(struct file *file,
945 int event, method_type, type, value; 922 int event, method_type, type, value;
946 union acpi_hotkey *key; 923 union acpi_hotkey *key;
947 924
948 ACPI_FUNCTION_TRACE("hotkey_execte_aml_method");
949 925
950 arg = (char *)kmalloc(count + 1, GFP_KERNEL); 926 arg = (char *)kmalloc(count + 1, GFP_KERNEL);
951 if (!arg) 927 if (!arg)
952 return_VALUE(-ENOMEM); 928 return -ENOMEM;
953 arg[count] = 0; 929 arg[count] = 0;
954 930
955 if (copy_from_user(arg, buffer, count)) { 931 if (copy_from_user(arg, buffer, count)) {
956 kfree(arg); 932 kfree(arg);
957 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument 2")); 933 printk(KERN_ERR PREFIX "Invalid argument 2\n");
958 return_VALUE(-EINVAL); 934 return -EINVAL;
959 } 935 }
960 936
961 if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) != 937 if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) !=
962 4) { 938 4) {
963 kfree(arg); 939 kfree(arg);
964 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument 3")); 940 printk(KERN_ERR PREFIX "Invalid argument 3\n");
965 return_VALUE(-EINVAL); 941 return -EINVAL;
966 } 942 }
967 kfree(arg); 943 kfree(arg);
968 if (type == ACPI_TYPE_INTEGER) { 944 if (type == ACPI_TYPE_INTEGER) {
@@ -987,12 +963,12 @@ static ssize_t hotkey_execute_aml_method(struct file *file,
987 963
988 } 964 }
989 } else { 965 } else {
990 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Not supported")); 966 printk(KERN_WARNING "Not supported\n");
991 return_VALUE(-EINVAL); 967 return -EINVAL;
992 } 968 }
993 return_VALUE(count); 969 return count;
994 do_fail: 970 do_fail:
995 return_VALUE(-EINVAL); 971 return -EINVAL;
996 972
997} 973}
998 974
@@ -1001,7 +977,6 @@ static int __init hotkey_init(void)
1001 int result; 977 int result;
1002 mode_t mode = S_IFREG | S_IRUGO | S_IWUGO; 978 mode_t mode = S_IFREG | S_IRUGO | S_IWUGO;
1003 979
1004 ACPI_FUNCTION_TRACE("hotkey_init");
1005 980
1006 if (acpi_disabled) 981 if (acpi_disabled)
1007 return -ENODEV; 982 return -ENODEV;
@@ -1013,9 +988,6 @@ static int __init hotkey_init(void)
1013 988
1014 hotkey_proc_dir = proc_mkdir(HOTKEY_PROC, acpi_root_dir); 989 hotkey_proc_dir = proc_mkdir(HOTKEY_PROC, acpi_root_dir);
1015 if (!hotkey_proc_dir) { 990 if (!hotkey_proc_dir) {
1016 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1017 "Hotkey: Unable to create %s entry\n",
1018 HOTKEY_PROC));
1019 return (-ENODEV); 991 return (-ENODEV);
1020 } 992 }
1021 hotkey_proc_dir->owner = THIS_MODULE; 993 hotkey_proc_dir->owner = THIS_MODULE;
@@ -1023,9 +995,6 @@ static int __init hotkey_init(void)
1023 hotkey_config = 995 hotkey_config =
1024 create_proc_entry(HOTKEY_EV_CONFIG, mode, hotkey_proc_dir); 996 create_proc_entry(HOTKEY_EV_CONFIG, mode, hotkey_proc_dir);
1025 if (!hotkey_config) { 997 if (!hotkey_config) {
1026 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1027 "Hotkey: Unable to create %s entry\n",
1028 HOTKEY_EV_CONFIG));
1029 goto do_fail1; 998 goto do_fail1;
1030 } else { 999 } else {
1031 hotkey_config->proc_fops = &hotkey_config_fops; 1000 hotkey_config->proc_fops = &hotkey_config_fops;
@@ -1038,10 +1007,6 @@ static int __init hotkey_init(void)
1038 hotkey_poll_config = 1007 hotkey_poll_config =
1039 create_proc_entry(HOTKEY_PL_CONFIG, mode, hotkey_proc_dir); 1008 create_proc_entry(HOTKEY_PL_CONFIG, mode, hotkey_proc_dir);
1040 if (!hotkey_poll_config) { 1009 if (!hotkey_poll_config) {
1041 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1042 "Hotkey: Unable to create %s entry\n",
1043 HOTKEY_EV_CONFIG));
1044
1045 goto do_fail2; 1010 goto do_fail2;
1046 } else { 1011 } else {
1047 hotkey_poll_config->proc_fops = &hotkey_poll_config_fops; 1012 hotkey_poll_config->proc_fops = &hotkey_poll_config_fops;
@@ -1053,9 +1018,6 @@ static int __init hotkey_init(void)
1053 1018
1054 hotkey_action = create_proc_entry(HOTKEY_ACTION, mode, hotkey_proc_dir); 1019 hotkey_action = create_proc_entry(HOTKEY_ACTION, mode, hotkey_proc_dir);
1055 if (!hotkey_action) { 1020 if (!hotkey_action) {
1056 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1057 "Hotkey: Unable to create %s entry\n",
1058 HOTKEY_ACTION));
1059 goto do_fail3; 1021 goto do_fail3;
1060 } else { 1022 } else {
1061 hotkey_action->proc_fops = &hotkey_action_fops; 1023 hotkey_action->proc_fops = &hotkey_action_fops;
@@ -1066,9 +1028,6 @@ static int __init hotkey_init(void)
1066 1028
1067 hotkey_info = create_proc_entry(HOTKEY_INFO, mode, hotkey_proc_dir); 1029 hotkey_info = create_proc_entry(HOTKEY_INFO, mode, hotkey_proc_dir);
1068 if (!hotkey_info) { 1030 if (!hotkey_info) {
1069 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1070 "Hotkey: Unable to create %s entry\n",
1071 HOTKEY_INFO));
1072 goto do_fail4; 1031 goto do_fail4;
1073 } else { 1032 } else {
1074 hotkey_info->proc_fops = &hotkey_info_fops; 1033 hotkey_info->proc_fops = &hotkey_info_fops;
@@ -1104,7 +1063,6 @@ static void __exit hotkey_exit(void)
1104{ 1063{
1105 struct list_head *entries, *next; 1064 struct list_head *entries, *next;
1106 1065
1107 ACPI_FUNCTION_TRACE("hotkey_exit");
1108 1066
1109 list_for_each_safe(entries, next, global_hotkey_list.entries) { 1067 list_for_each_safe(entries, next, global_hotkey_list.entries) {
1110 union acpi_hotkey *key = 1068 union acpi_hotkey *key =