Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174329
b: refs/heads/master
c: 0240d7b
h: refs/heads/master
i:
  174327: 306d6cc
v: v3
  • Loading branch information
Lin Ming authored and Len Brown committed Nov 25, 2009
1 parent 754821f commit 0f2394b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2752699392b828edf3123f911f6e8b4dd7daeb56
refs/heads/master: 0240d7b4f20f7d156a74dfdd0647a0231b7e8ef4
23 changes: 21 additions & 2 deletions trunk/drivers/acpi/acpica/nsrepair.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
#include "acinterp.h"
#include "acpredef.h"

#define _COMPONENT ACPI_NAMESPACE
Expand Down Expand Up @@ -76,6 +77,7 @@ acpi_ns_repair_object(struct acpi_predefined_data *data,
union acpi_operand_object *return_object = *return_object_ptr;
union acpi_operand_object *new_object;
acpi_size length;
acpi_status status;

/*
* At this point, we know that the type of the returned object was not
Expand Down Expand Up @@ -120,9 +122,26 @@ acpi_ns_repair_object(struct acpi_predefined_data *data,

case ACPI_TYPE_INTEGER:

/* Does the method/object legally return a string? */
/* 1) Does the method/object legally return a buffer? */

if (expected_btypes & ACPI_RTYPE_BUFFER) {
/*
* Convert the Integer to a packed-byte buffer. _MAT needs
* this sometimes, if a read has been performed on a Field
* object that is less than or equal to the global integer
* size (32 or 64 bits).
*/
status =
acpi_ex_convert_to_buffer(return_object,
&new_object);
if (ACPI_FAILURE(status)) {
return (status);
}
}

/* 2) Does the method/object legally return a string? */

if (expected_btypes & ACPI_RTYPE_STRING) {
else if (expected_btypes & ACPI_RTYPE_STRING) {
/*
* The only supported Integer-to-String conversion is to convert
* an integer of value 0 to a NULL string. The last element of
Expand Down

0 comments on commit 0f2394b

Please sign in to comment.