uteval.c (18ffa418aead13c56515ac74cd26105102128aca) | uteval.c (3371c19c294a4cb3649aa4e84606be8a1d999e61) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: uteval - Object evaluation 4 * 5 *****************************************************************************/ 6 7/* 8 * Copyright (C) 2000 - 2008, Intel Corp. --- 234 unchanged lines hidden (view full) --- 243 status = AE_NOT_EXIST; 244 } 245 246 goto cleanup; 247 } 248 249 /* Map the return object type to the bitmapped type */ 250 | 1/****************************************************************************** 2 * 3 * Module Name: uteval - Object evaluation 4 * 5 *****************************************************************************/ 6 7/* 8 * Copyright (C) 2000 - 2008, Intel Corp. --- 234 unchanged lines hidden (view full) --- 243 status = AE_NOT_EXIST; 244 } 245 246 goto cleanup; 247 } 248 249 /* Map the return object type to the bitmapped type */ 250 |
251 switch (ACPI_GET_OBJECT_TYPE(info->return_object)) { | 251 switch ((info->return_object)->common.type) { |
252 case ACPI_TYPE_INTEGER: 253 return_btype = ACPI_BTYPE_INTEGER; 254 break; 255 256 case ACPI_TYPE_BUFFER: 257 return_btype = ACPI_BTYPE_BUFFER; 258 break; 259 --- 153 unchanged lines hidden (view full) --- 413 414 status = acpi_ut_evaluate_object(device_node, METHOD_NAME__HID, 415 ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, 416 &obj_desc); 417 if (ACPI_FAILURE(status)) { 418 return_ACPI_STATUS(status); 419 } 420 | 252 case ACPI_TYPE_INTEGER: 253 return_btype = ACPI_BTYPE_INTEGER; 254 break; 255 256 case ACPI_TYPE_BUFFER: 257 return_btype = ACPI_BTYPE_BUFFER; 258 break; 259 --- 153 unchanged lines hidden (view full) --- 413 414 status = acpi_ut_evaluate_object(device_node, METHOD_NAME__HID, 415 ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, 416 &obj_desc); 417 if (ACPI_FAILURE(status)) { 418 return_ACPI_STATUS(status); 419 } 420 |
421 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | 421 if (obj_desc->common.type == ACPI_TYPE_INTEGER) { |
422 423 /* Convert the Numeric HID to string */ 424 425 acpi_ex_eisa_id_to_string((u32) obj_desc->integer.value, 426 hid->value); 427 } else { 428 /* Copy the String HID from the returned object */ 429 --- 24 unchanged lines hidden (view full) --- 454 * 455 ******************************************************************************/ 456 457static acpi_status 458acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc, 459 struct acpi_compatible_id *one_cid) 460{ 461 | 422 423 /* Convert the Numeric HID to string */ 424 425 acpi_ex_eisa_id_to_string((u32) obj_desc->integer.value, 426 hid->value); 427 } else { 428 /* Copy the String HID from the returned object */ 429 --- 24 unchanged lines hidden (view full) --- 454 * 455 ******************************************************************************/ 456 457static acpi_status 458acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc, 459 struct acpi_compatible_id *one_cid) 460{ 461 |
462 switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | 462 switch (obj_desc->common.type) { |
463 case ACPI_TYPE_INTEGER: 464 465 /* Convert the Numeric CID to string */ 466 467 acpi_ex_eisa_id_to_string((u32) obj_desc->integer.value, 468 one_cid->value); 469 return (AE_OK); 470 --- 51 unchanged lines hidden (view full) --- 522 | ACPI_BTYPE_PACKAGE, &obj_desc); 523 if (ACPI_FAILURE(status)) { 524 return_ACPI_STATUS(status); 525 } 526 527 /* Get the number of _CIDs returned */ 528 529 count = 1; | 463 case ACPI_TYPE_INTEGER: 464 465 /* Convert the Numeric CID to string */ 466 467 acpi_ex_eisa_id_to_string((u32) obj_desc->integer.value, 468 one_cid->value); 469 return (AE_OK); 470 --- 51 unchanged lines hidden (view full) --- 522 | ACPI_BTYPE_PACKAGE, &obj_desc); 523 if (ACPI_FAILURE(status)) { 524 return_ACPI_STATUS(status); 525 } 526 527 /* Get the number of _CIDs returned */ 528 529 count = 1; |
530 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_PACKAGE) { | 530 if (obj_desc->common.type == ACPI_TYPE_PACKAGE) { |
531 count = obj_desc->package.count; 532 } 533 534 /* Allocate a worst-case buffer for the _CIDs */ 535 536 size = (((count - 1) * sizeof(struct acpi_compatible_id)) + 537 sizeof(struct acpi_compatible_id_list)); 538 --- 11 unchanged lines hidden (view full) --- 550 * A _CID can return either a single compatible ID or a package of 551 * compatible IDs. Each compatible ID can be one of the following: 552 * 1) Integer (32 bit compressed EISA ID) or 553 * 2) String (PCI ID format, e.g. "PCI\VEN_vvvv&DEV_dddd&SUBSYS_ssssssss") 554 */ 555 556 /* The _CID object can be either a single CID or a package (list) of CIDs */ 557 | 531 count = obj_desc->package.count; 532 } 533 534 /* Allocate a worst-case buffer for the _CIDs */ 535 536 size = (((count - 1) * sizeof(struct acpi_compatible_id)) + 537 sizeof(struct acpi_compatible_id_list)); 538 --- 11 unchanged lines hidden (view full) --- 550 * A _CID can return either a single compatible ID or a package of 551 * compatible IDs. Each compatible ID can be one of the following: 552 * 1) Integer (32 bit compressed EISA ID) or 553 * 2) String (PCI ID format, e.g. "PCI\VEN_vvvv&DEV_dddd&SUBSYS_ssssssss") 554 */ 555 556 /* The _CID object can be either a single CID or a package (list) of CIDs */ 557 |
558 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_PACKAGE) { | 558 if (obj_desc->common.type == ACPI_TYPE_PACKAGE) { |
559 560 /* Translate each package element */ 561 562 for (i = 0; i < count; i++) { 563 status = 564 acpi_ut_translate_one_cid(obj_desc->package. 565 elements[i], 566 &cid_list->id[i]); --- 48 unchanged lines hidden (view full) --- 615 616 status = acpi_ut_evaluate_object(device_node, METHOD_NAME__UID, 617 ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, 618 &obj_desc); 619 if (ACPI_FAILURE(status)) { 620 return_ACPI_STATUS(status); 621 } 622 | 559 560 /* Translate each package element */ 561 562 for (i = 0; i < count; i++) { 563 status = 564 acpi_ut_translate_one_cid(obj_desc->package. 565 elements[i], 566 &cid_list->id[i]); --- 48 unchanged lines hidden (view full) --- 615 616 status = acpi_ut_evaluate_object(device_node, METHOD_NAME__UID, 617 ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, 618 &obj_desc); 619 if (ACPI_FAILURE(status)) { 620 return_ACPI_STATUS(status); 621 } 622 |
623 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { | 623 if (obj_desc->common.type == ACPI_TYPE_INTEGER) { |
624 625 /* Convert the Numeric UID to string */ 626 627 acpi_ex_unsigned_integer_to_string(obj_desc->integer.value, 628 uid->value); 629 } else { 630 /* Copy the String UID from the returned object */ 631 --- 118 unchanged lines hidden --- | 624 625 /* Convert the Numeric UID to string */ 626 627 acpi_ex_unsigned_integer_to_string(obj_desc->integer.value, 628 uid->value); 629 } else { 630 /* Copy the String UID from the returned object */ 631 --- 118 unchanged lines hidden --- |