Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217650
b: refs/heads/master
c: 34cf66e
h: refs/heads/master
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Oct 18, 2010
1 parent 139b4a2 commit a9bb08f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 42 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: 81256669aaaa8b06a617f8d0613cb7fb24f8b910
refs/heads/master: 34cf66e724a2bf0a406d59b18f5bfeed746d7979
45 changes: 4 additions & 41 deletions trunk/drivers/acpi/acpica/utids.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,42 +48,6 @@
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME("utids")

/* Local prototypes */
static void acpi_ut_copy_id_string(char *destination, char *source);

/*******************************************************************************
*
* FUNCTION: acpi_ut_copy_id_string
*
* PARAMETERS: Destination - Where to copy the string
* Source - Source string
*
* RETURN: None
*
* DESCRIPTION: Copies an ID string for the _HID, _CID, and _UID methods.
* Performs removal of a leading asterisk if present -- workaround
* for a known issue on a bunch of machines.
*
******************************************************************************/

static void acpi_ut_copy_id_string(char *destination, char *source)
{

/*
* Workaround for ID strings that have a leading asterisk. This construct
* is not allowed by the ACPI specification (ID strings must be
* alphanumeric), but enough existing machines have this embedded in their
* ID strings that the following code is useful.
*/
if (*source == '*') {
source++;
}

/* Do the actual copy */

ACPI_STRCPY(destination, source);
}

/*******************************************************************************
*
* FUNCTION: acpi_ut_execute_HID
Expand All @@ -101,7 +65,6 @@ static void acpi_ut_copy_id_string(char *destination, char *source)
* NOTE: Internal function, no parameter validation
*
******************************************************************************/

acpi_status
acpi_ut_execute_HID(struct acpi_namespace_node *device_node,
struct acpica_device_id **return_id)
Expand Down Expand Up @@ -147,7 +110,7 @@ acpi_ut_execute_HID(struct acpi_namespace_node *device_node,
if (obj_desc->common.type == ACPI_TYPE_INTEGER) {
acpi_ex_eisa_id_to_string(hid->string, obj_desc->integer.value);
} else {
acpi_ut_copy_id_string(hid->string, obj_desc->string.pointer);
ACPI_STRCPY(hid->string, obj_desc->string.pointer);
}

hid->length = length;
Expand Down Expand Up @@ -224,7 +187,7 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
if (obj_desc->common.type == ACPI_TYPE_INTEGER) {
acpi_ex_integer_to_string(uid->string, obj_desc->integer.value);
} else {
acpi_ut_copy_id_string(uid->string, obj_desc->string.pointer);
ACPI_STRCPY(uid->string, obj_desc->string.pointer);
}

uid->length = length;
Expand Down Expand Up @@ -357,8 +320,8 @@ acpi_ut_execute_CID(struct acpi_namespace_node *device_node,

/* Copy the String CID from the returned object */

acpi_ut_copy_id_string(next_id_string,
cid_objects[i]->string.pointer);
ACPI_STRCPY(next_id_string,
cid_objects[i]->string.pointer);
length = cid_objects[i]->string.length + 1;
}

Expand Down

0 comments on commit a9bb08f

Please sign in to comment.