aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/hardware/hwregs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/hardware/hwregs.c')
-rw-r--r--drivers/acpi/hardware/hwregs.c43
1 files changed, 28 insertions, 15 deletions
diff --git a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c
index b4b50a3d1705..e1fe75498415 100644
--- a/drivers/acpi/hardware/hwregs.c
+++ b/drivers/acpi/hardware/hwregs.c
@@ -160,15 +160,16 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
160 /* Must have a return object */ 160 /* Must have a return object */
161 161
162 if (!info.return_object) { 162 if (!info.return_object) {
163 ACPI_REPORT_ERROR(("No Sleep State object returned from [%s]\n", 163 ACPI_ERROR((AE_INFO, "No Sleep State object returned from [%s]",
164 sleep_state_name)); 164 sleep_state_name));
165 status = AE_NOT_EXIST; 165 status = AE_NOT_EXIST;
166 } 166 }
167 167
168 /* It must be of type Package */ 168 /* It must be of type Package */
169 169
170 else if (ACPI_GET_OBJECT_TYPE(info.return_object) != ACPI_TYPE_PACKAGE) { 170 else if (ACPI_GET_OBJECT_TYPE(info.return_object) != ACPI_TYPE_PACKAGE) {
171 ACPI_REPORT_ERROR(("Sleep State return object is not a Package\n")); 171 ACPI_ERROR((AE_INFO,
172 "Sleep State return object is not a Package"));
172 status = AE_AML_OPERAND_TYPE; 173 status = AE_AML_OPERAND_TYPE;
173 } 174 }
174 175
@@ -180,7 +181,8 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
180 * one per sleep type (A/B). 181 * one per sleep type (A/B).
181 */ 182 */
182 else if (info.return_object->package.count < 2) { 183 else if (info.return_object->package.count < 2) {
183 ACPI_REPORT_ERROR(("Sleep State return package does not have at least two elements\n")); 184 ACPI_ERROR((AE_INFO,
185 "Sleep State return package does not have at least two elements"));
184 status = AE_AML_NO_OPERAND; 186 status = AE_AML_NO_OPERAND;
185 } 187 }
186 188
@@ -190,7 +192,12 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
190 != ACPI_TYPE_INTEGER) || 192 != ACPI_TYPE_INTEGER) ||
191 (ACPI_GET_OBJECT_TYPE(info.return_object->package.elements[1]) 193 (ACPI_GET_OBJECT_TYPE(info.return_object->package.elements[1])
192 != ACPI_TYPE_INTEGER)) { 194 != ACPI_TYPE_INTEGER)) {
193 ACPI_REPORT_ERROR(("Sleep State return package elements are not both Integers (%s, %s)\n", acpi_ut_get_object_type_name(info.return_object->package.elements[0]), acpi_ut_get_object_type_name(info.return_object->package.elements[1]))); 195 ACPI_ERROR((AE_INFO,
196 "Sleep State return package elements are not both Integers (%s, %s)",
197 acpi_ut_get_object_type_name(info.return_object->
198 package.elements[0]),
199 acpi_ut_get_object_type_name(info.return_object->
200 package.elements[1])));
194 status = AE_AML_OPERAND_TYPE; 201 status = AE_AML_OPERAND_TYPE;
195 } else { 202 } else {
196 /* Valid _Sx_ package size, type, and value */ 203 /* Valid _Sx_ package size, type, and value */
@@ -202,7 +209,11 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
202 } 209 }
203 210
204 if (ACPI_FAILURE(status)) { 211 if (ACPI_FAILURE(status)) {
205 ACPI_REPORT_ERROR(("%s While evaluating sleep_state [%s], bad Sleep object %p type %s\n", acpi_format_exception(status), sleep_state_name, info.return_object, acpi_ut_get_object_type_name(info.return_object))); 212 ACPI_EXCEPTION((AE_INFO, status,
213 "While evaluating sleep_state [%s], bad Sleep object %p type %s",
214 sleep_state_name, info.return_object,
215 acpi_ut_get_object_type_name(info.
216 return_object)));
206 } 217 }
207 218
208 acpi_ut_remove_reference(info.return_object); 219 acpi_ut_remove_reference(info.return_object);
@@ -228,8 +239,8 @@ struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
228 ACPI_FUNCTION_ENTRY(); 239 ACPI_FUNCTION_ENTRY();
229 240
230 if (register_id > ACPI_BITREG_MAX) { 241 if (register_id > ACPI_BITREG_MAX) {
231 ACPI_REPORT_ERROR(("Invalid bit_register ID: %X\n", 242 ACPI_ERROR((AE_INFO, "Invalid bit_register ID: %X",
232 register_id)); 243 register_id));
233 return (NULL); 244 return (NULL);
234 } 245 }
235 246
@@ -329,8 +340,8 @@ acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags)
329 340
330 bit_reg_info = acpi_hw_get_bit_register_info(register_id); 341 bit_reg_info = acpi_hw_get_bit_register_info(register_id);
331 if (!bit_reg_info) { 342 if (!bit_reg_info) {
332 ACPI_REPORT_ERROR(("Bad ACPI HW register_id: %X\n", 343 ACPI_ERROR((AE_INFO, "Bad ACPI HW register_id: %X",
333 register_id)); 344 register_id));
334 return_ACPI_STATUS(AE_BAD_PARAMETER); 345 return_ACPI_STATUS(AE_BAD_PARAMETER);
335 } 346 }
336 347
@@ -564,7 +575,7 @@ acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value)
564 break; 575 break;
565 576
566 default: 577 default:
567 ACPI_REPORT_ERROR(("Unknown Register ID: %X\n", register_id)); 578 ACPI_ERROR((AE_INFO, "Unknown Register ID: %X", register_id));
568 status = AE_BAD_PARAMETER; 579 status = AE_BAD_PARAMETER;
569 break; 580 break;
570 } 581 }
@@ -759,8 +770,9 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg)
759 break; 770 break;
760 771
761 default: 772 default:
762 ACPI_REPORT_ERROR(("Unsupported address space: %X\n", 773 ACPI_ERROR((AE_INFO,
763 reg->address_space_id)); 774 "Unsupported address space: %X",
775 reg->address_space_id));
764 return (AE_BAD_PARAMETER); 776 return (AE_BAD_PARAMETER);
765 } 777 }
766 778
@@ -829,8 +841,9 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg)
829 break; 841 break;
830 842
831 default: 843 default:
832 ACPI_REPORT_ERROR(("Unsupported address space: %X\n", 844 ACPI_ERROR((AE_INFO,
833 reg->address_space_id)); 845 "Unsupported address space: %X",
846 reg->address_space_id));
834 return (AE_BAD_PARAMETER); 847 return (AE_BAD_PARAMETER);
835 } 848 }
836 849