aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/hotkey.c
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2006-06-26 23:58:43 -0400
committerLen Brown <len.brown@intel.com>2006-06-26 23:58:43 -0400
commita6fc67202e0224e6c9d1d285cc0b444bce887ed5 (patch)
treecb2d422f65c0ab0a95f452f6bac80e2bfdd547de /drivers/acpi/hotkey.c
parenteb99adde31b7d85c67a5e1c2fa5e098e1056dd79 (diff)
ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUG
Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/hotkey.c')
-rw-r--r--drivers/acpi/hotkey.c38
1 files changed, 9 insertions, 29 deletions
diff --git a/drivers/acpi/hotkey.c b/drivers/acpi/hotkey.c
index c25b2b92edcf..37dcb1f7f983 100644
--- a/drivers/acpi/hotkey.c
+++ b/drivers/acpi/hotkey.c
@@ -356,9 +356,6 @@ static int create_polling_proc(union acpi_hotkey *device)
356 proc = create_proc_entry(proc_name, mode, hotkey_proc_dir); 356 proc = create_proc_entry(proc_name, mode, hotkey_proc_dir);
357 357
358 if (!proc) { 358 if (!proc) {
359 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
360 "Hotkey: Unable to create %s entry\n",
361 device->poll_hotkey.poll_method));
362 return_VALUE(-ENODEV); 359 return_VALUE(-ENODEV);
363 } else { 360 } else {
364 proc->proc_fops = &hotkey_polling_fops; 361 proc->proc_fops = &hotkey_polling_fops;
@@ -771,7 +768,7 @@ static ssize_t hotkey_write_config(struct file *file,
771 768
772 if (copy_from_user(config_record, buffer, count)) { 769 if (copy_from_user(config_record, buffer, count)) {
773 kfree(config_record); 770 kfree(config_record);
774 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data \n")); 771 ACPI_ERROR((AE_INFO, "Invalid data"));
775 return_VALUE(-EINVAL); 772 return_VALUE(-EINVAL);
776 } 773 }
777 config_record[count] = 0; 774 config_record[count] = 0;
@@ -792,8 +789,7 @@ static ssize_t hotkey_write_config(struct file *file,
792 kfree(bus_method); 789 kfree(bus_method);
793 kfree(action_handle); 790 kfree(action_handle);
794 kfree(method); 791 kfree(method);
795 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 792 ACPI_ERROR((AE_INFO, "Invalid data format ret=%d", ret));
796 "Invalid data format ret=%d\n", ret));
797 return_VALUE(-EINVAL); 793 return_VALUE(-EINVAL);
798 } 794 }
799 795
@@ -806,7 +802,7 @@ static ssize_t hotkey_write_config(struct file *file,
806 tmp = get_hotkey_by_event(&global_hotkey_list, 802 tmp = get_hotkey_by_event(&global_hotkey_list,
807 internal_event_num); 803 internal_event_num);
808 if (!tmp) 804 if (!tmp)
809 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid key")); 805 ACPI_ERROR((AE_INFO, "Invalid key"));
810 else 806 else
811 memcpy(key, tmp, sizeof(union acpi_hotkey)); 807 memcpy(key, tmp, sizeof(union acpi_hotkey));
812 goto cont_cmd; 808 goto cont_cmd;
@@ -828,7 +824,7 @@ static ssize_t hotkey_write_config(struct file *file,
828 else 824 else
829 free_poll_hotkey_buffer(key); 825 free_poll_hotkey_buffer(key);
830 kfree(key); 826 kfree(key);
831 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid hotkey \n")); 827 ACPI_ERROR((AE_INFO, "Invalid hotkey"));
832 return_VALUE(-EINVAL); 828 return_VALUE(-EINVAL);
833 } 829 }
834 830
@@ -862,7 +858,7 @@ static ssize_t hotkey_write_config(struct file *file,
862 else 858 else
863 free_poll_hotkey_buffer(key); 859 free_poll_hotkey_buffer(key);
864 kfree(key); 860 kfree(key);
865 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid key\n")); 861 ACPI_ERROR((AE_INFO, "invalid key"));
866 return_VALUE(-EINVAL); 862 return_VALUE(-EINVAL);
867} 863}
868 864
@@ -907,7 +903,7 @@ static int read_acpi_int(acpi_handle handle, const char *method,
907 val->integer.value = out_obj.integer.value; 903 val->integer.value = out_obj.integer.value;
908 val->type = out_obj.type; 904 val->type = out_obj.type;
909 } else 905 } else
910 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "null val pointer")); 906 ACPI_ERROR((AE_INFO, "null val pointer"));
911 return_VALUE((status == AE_OK) 907 return_VALUE((status == AE_OK)
912 && (out_obj.type == ACPI_TYPE_INTEGER)); 908 && (out_obj.type == ACPI_TYPE_INTEGER));
913} 909}
@@ -954,14 +950,14 @@ static ssize_t hotkey_execute_aml_method(struct file *file,
954 950
955 if (copy_from_user(arg, buffer, count)) { 951 if (copy_from_user(arg, buffer, count)) {
956 kfree(arg); 952 kfree(arg);
957 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument 2")); 953 ACPI_ERROR((AE_INFO, "Invalid argument 2"));
958 return_VALUE(-EINVAL); 954 return_VALUE(-EINVAL);
959 } 955 }
960 956
961 if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) != 957 if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) !=
962 4) { 958 4) {
963 kfree(arg); 959 kfree(arg);
964 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument 3")); 960 ACPI_ERROR((AE_INFO, "Invalid argument 3"));
965 return_VALUE(-EINVAL); 961 return_VALUE(-EINVAL);
966 } 962 }
967 kfree(arg); 963 kfree(arg);
@@ -987,7 +983,7 @@ static ssize_t hotkey_execute_aml_method(struct file *file,
987 983
988 } 984 }
989 } else { 985 } else {
990 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Not supported")); 986 ACPI_WARNING((AE_INFO, "Not supported"));
991 return_VALUE(-EINVAL); 987 return_VALUE(-EINVAL);
992 } 988 }
993 return_VALUE(count); 989 return_VALUE(count);
@@ -1013,9 +1009,6 @@ static int __init hotkey_init(void)
1013 1009
1014 hotkey_proc_dir = proc_mkdir(HOTKEY_PROC, acpi_root_dir); 1010 hotkey_proc_dir = proc_mkdir(HOTKEY_PROC, acpi_root_dir);
1015 if (!hotkey_proc_dir) { 1011 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); 1012 return (-ENODEV);
1020 } 1013 }
1021 hotkey_proc_dir->owner = THIS_MODULE; 1014 hotkey_proc_dir->owner = THIS_MODULE;
@@ -1023,9 +1016,6 @@ static int __init hotkey_init(void)
1023 hotkey_config = 1016 hotkey_config =
1024 create_proc_entry(HOTKEY_EV_CONFIG, mode, hotkey_proc_dir); 1017 create_proc_entry(HOTKEY_EV_CONFIG, mode, hotkey_proc_dir);
1025 if (!hotkey_config) { 1018 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; 1019 goto do_fail1;
1030 } else { 1020 } else {
1031 hotkey_config->proc_fops = &hotkey_config_fops; 1021 hotkey_config->proc_fops = &hotkey_config_fops;
@@ -1038,10 +1028,6 @@ static int __init hotkey_init(void)
1038 hotkey_poll_config = 1028 hotkey_poll_config =
1039 create_proc_entry(HOTKEY_PL_CONFIG, mode, hotkey_proc_dir); 1029 create_proc_entry(HOTKEY_PL_CONFIG, mode, hotkey_proc_dir);
1040 if (!hotkey_poll_config) { 1030 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; 1031 goto do_fail2;
1046 } else { 1032 } else {
1047 hotkey_poll_config->proc_fops = &hotkey_poll_config_fops; 1033 hotkey_poll_config->proc_fops = &hotkey_poll_config_fops;
@@ -1053,9 +1039,6 @@ static int __init hotkey_init(void)
1053 1039
1054 hotkey_action = create_proc_entry(HOTKEY_ACTION, mode, hotkey_proc_dir); 1040 hotkey_action = create_proc_entry(HOTKEY_ACTION, mode, hotkey_proc_dir);
1055 if (!hotkey_action) { 1041 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; 1042 goto do_fail3;
1060 } else { 1043 } else {
1061 hotkey_action->proc_fops = &hotkey_action_fops; 1044 hotkey_action->proc_fops = &hotkey_action_fops;
@@ -1066,9 +1049,6 @@ static int __init hotkey_init(void)
1066 1049
1067 hotkey_info = create_proc_entry(HOTKEY_INFO, mode, hotkey_proc_dir); 1050 hotkey_info = create_proc_entry(HOTKEY_INFO, mode, hotkey_proc_dir);
1068 if (!hotkey_info) { 1051 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; 1052 goto do_fail4;
1073 } else { 1053 } else {
1074 hotkey_info->proc_fops = &hotkey_info_fops; 1054 hotkey_info->proc_fops = &hotkey_info_fops;