aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/resources/rscreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/resources/rscreate.c')
-rw-r--r--drivers/acpi/resources/rscreate.c42
1 files changed, 8 insertions, 34 deletions
diff --git a/drivers/acpi/resources/rscreate.c b/drivers/acpi/resources/rscreate.c
index 6c7c6c560635..7f46ca0bf33a 100644
--- a/drivers/acpi/resources/rscreate.c
+++ b/drivers/acpi/resources/rscreate.c
@@ -5,7 +5,7 @@
5 ******************************************************************************/ 5 ******************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -207,21 +207,14 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
207 /* Each element of the top-level package must also be a package */ 207 /* Each element of the top-level package must also be a package */
208 208
209 if (ACPI_GET_OBJECT_TYPE(*top_object_list) != ACPI_TYPE_PACKAGE) { 209 if (ACPI_GET_OBJECT_TYPE(*top_object_list) != ACPI_TYPE_PACKAGE) {
210 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 210 ACPI_REPORT_ERROR(("(PRT[%X]) Need sub-package, found %s\n", index, acpi_ut_get_object_type_name(*top_object_list)));
211 "(PRT[%X]) Need sub-package, found %s\n",
212 index,
213 acpi_ut_get_object_type_name
214 (*top_object_list)));
215 return_ACPI_STATUS(AE_AML_OPERAND_TYPE); 211 return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
216 } 212 }
217 213
218 /* Each sub-package must be of length 4 */ 214 /* Each sub-package must be of length 4 */
219 215
220 if ((*top_object_list)->package.count != 4) { 216 if ((*top_object_list)->package.count != 4) {
221 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 217 ACPI_REPORT_ERROR(("(PRT[%X]) Need package of length 4, found length %d\n", index, (*top_object_list)->package.count));
222 "(PRT[%X]) Need package of length 4, found length %d\n",
223 index,
224 (*top_object_list)->package.count));
225 return_ACPI_STATUS(AE_AML_PACKAGE_LIMIT); 218 return_ACPI_STATUS(AE_AML_PACKAGE_LIMIT);
226 } 219 }
227 220
@@ -238,11 +231,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
238 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { 231 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) {
239 user_prt->address = obj_desc->integer.value; 232 user_prt->address = obj_desc->integer.value;
240 } else { 233 } else {
241 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 234 ACPI_REPORT_ERROR(("(PRT[%X].Address) Need Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc)));
242 "(PRT[%X].Address) Need Integer, found %s\n",
243 index,
244 acpi_ut_get_object_type_name
245 (obj_desc)));
246 return_ACPI_STATUS(AE_BAD_DATA); 235 return_ACPI_STATUS(AE_BAD_DATA);
247 } 236 }
248 237
@@ -252,11 +241,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
252 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { 241 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) {
253 user_prt->pin = (u32) obj_desc->integer.value; 242 user_prt->pin = (u32) obj_desc->integer.value;
254 } else { 243 } else {
255 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 244 ACPI_REPORT_ERROR(("(PRT[%X].Pin) Need Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc)));
256 "(PRT[%X].Pin) Need Integer, found %s\n",
257 index,
258 acpi_ut_get_object_type_name
259 (obj_desc)));
260 return_ACPI_STATUS(AE_BAD_DATA); 245 return_ACPI_STATUS(AE_BAD_DATA);
261 } 246 }
262 247
@@ -267,10 +252,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
267 case ACPI_TYPE_LOCAL_REFERENCE: 252 case ACPI_TYPE_LOCAL_REFERENCE:
268 253
269 if (obj_desc->reference.opcode != AML_INT_NAMEPATH_OP) { 254 if (obj_desc->reference.opcode != AML_INT_NAMEPATH_OP) {
270 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 255 ACPI_REPORT_ERROR(("(PRT[%X].Source) Need name, found reference op %X\n", index, obj_desc->reference.opcode));
271 "(PRT[%X].Source) Need name, found reference op %X\n",
272 index,
273 obj_desc->reference.opcode));
274 return_ACPI_STATUS(AE_BAD_DATA); 256 return_ACPI_STATUS(AE_BAD_DATA);
275 } 257 }
276 258
@@ -316,11 +298,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
316 298
317 default: 299 default:
318 300
319 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 301 ACPI_REPORT_ERROR(("(PRT[%X].Source) Need Ref/String/Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc)));
320 "(PRT[%X].Source) Need Ref/String/Integer, found %s\n",
321 index,
322 acpi_ut_get_object_type_name
323 (obj_desc)));
324 return_ACPI_STATUS(AE_BAD_DATA); 302 return_ACPI_STATUS(AE_BAD_DATA);
325 } 303 }
326 304
@@ -335,11 +313,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
335 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { 313 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) {
336 user_prt->source_index = (u32) obj_desc->integer.value; 314 user_prt->source_index = (u32) obj_desc->integer.value;
337 } else { 315 } else {
338 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 316 ACPI_REPORT_ERROR(("(PRT[%X].source_index) Need Integer, found %s\n", index, acpi_ut_get_object_type_name(obj_desc)));
339 "(PRT[%X].source_index) Need Integer, found %s\n",
340 index,
341 acpi_ut_get_object_type_name
342 (obj_desc)));
343 return_ACPI_STATUS(AE_BAD_DATA); 317 return_ACPI_STATUS(AE_BAD_DATA);
344 } 318 }
345 319