Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336639
b: refs/heads/master
c: 78e25fe
h: refs/heads/master
i:
  336637: 4112037
  336635: 8194c1f
  336631: b962780
  336623: 74e49af
  336607: d24d8b2
  336575: ad27bcb
  336511: 5999210
  336383: 1aed766
v: v3
  • Loading branch information
Lv Zheng authored and Rafael J. Wysocki committed Nov 14, 2012
1 parent 072e4fe commit 06cb8ae
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 46 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: f540fadf29a6987efbfa7daf10976935fd59ae7c
refs/heads/master: 78e25fef2751434f38c7f711ecbf8762f79f7318
6 changes: 3 additions & 3 deletions trunk/drivers/acpi/acpica/acutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,15 @@ acpi_ut_execute_power_methods(struct acpi_namespace_node *device_node,
*/
acpi_status
acpi_ut_execute_HID(struct acpi_namespace_node *device_node,
struct acpica_device_id ** return_id);
struct acpi_pnp_device_id ** return_id);

acpi_status
acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
struct acpica_device_id ** return_id);
struct acpi_pnp_device_id ** return_id);

acpi_status
acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
struct acpica_device_id_list ** return_cid_list);
struct acpi_pnp_device_id_list ** return_cid_list);

/*
* utlock - reader/writer locks
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/acpica/evrgnini.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node)
{
acpi_status status;
struct acpica_device_id *hid;
struct acpica_device_id_list *cid;
struct acpi_pnp_device_id *hid;
struct acpi_pnp_device_id_list *cid;
u32 i;
u8 match;

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/acpica/nsxfeval.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,8 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
acpi_status status;
struct acpi_namespace_node *node;
u32 flags;
struct acpica_device_id *hid;
struct acpica_device_id_list *cid;
struct acpi_pnp_device_id *hid;
struct acpi_pnp_device_id_list *cid;
u32 i;
u8 found;
int no_match;
Expand Down
28 changes: 14 additions & 14 deletions trunk/drivers/acpi/acpica/nsxfname.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
ACPI_MODULE_NAME("nsxfname")

/* Local prototypes */
static char *acpi_ns_copy_device_id(struct acpica_device_id *dest,
struct acpica_device_id *source,
static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
struct acpi_pnp_device_id *source,
char *string_area);

/******************************************************************************
Expand Down Expand Up @@ -219,20 +219,20 @@ ACPI_EXPORT_SYMBOL(acpi_get_name)
*
* FUNCTION: acpi_ns_copy_device_id
*
* PARAMETERS: dest - Pointer to the destination DEVICE_ID
* source - Pointer to the source DEVICE_ID
* PARAMETERS: dest - Pointer to the destination PNP_DEVICE_ID
* source - Pointer to the source PNP_DEVICE_ID
* string_area - Pointer to where to copy the dest string
*
* RETURN: Pointer to the next string area
*
* DESCRIPTION: Copy a single DEVICE_ID, including the string data.
* DESCRIPTION: Copy a single PNP_DEVICE_ID, including the string data.
*
******************************************************************************/
static char *acpi_ns_copy_device_id(struct acpica_device_id *dest,
struct acpica_device_id *source,
static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
struct acpi_pnp_device_id *source,
char *string_area)
{
/* Create the destination DEVICE_ID */
/* Create the destination PNP_DEVICE_ID */

dest->string = string_area;
dest->length = source->length;
Expand Down Expand Up @@ -269,9 +269,9 @@ acpi_get_object_info(acpi_handle handle,
{
struct acpi_namespace_node *node;
struct acpi_device_info *info;
struct acpica_device_id_list *cid_list = NULL;
struct acpica_device_id *hid = NULL;
struct acpica_device_id *uid = NULL;
struct acpi_pnp_device_id_list *cid_list = NULL;
struct acpi_pnp_device_id *hid = NULL;
struct acpi_pnp_device_id *uid = NULL;
char *next_id_string;
acpi_object_type type;
acpi_name name;
Expand Down Expand Up @@ -348,7 +348,7 @@ acpi_get_object_info(acpi_handle handle,

info_size +=
(cid_list->list_size -
sizeof(struct acpica_device_id_list));
sizeof(struct acpi_pnp_device_id_list));
valid |= ACPI_VALID_CID;
}
}
Expand Down Expand Up @@ -418,11 +418,11 @@ acpi_get_object_info(acpi_handle handle,
next_id_string = ACPI_CAST_PTR(char, info->compatible_id_list.ids);
if (cid_list) {

/* Point past the CID DEVICE_ID array */
/* Point past the CID PNP_DEVICE_ID array */

next_id_string +=
((acpi_size) cid_list->count *
sizeof(struct acpica_device_id));
sizeof(struct acpi_pnp_device_id));
}

/*
Expand Down
37 changes: 20 additions & 17 deletions trunk/drivers/acpi/acpica/utids.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ ACPI_MODULE_NAME("utids")
******************************************************************************/
acpi_status
acpi_ut_execute_HID(struct acpi_namespace_node *device_node,
struct acpica_device_id **return_id)
struct acpi_pnp_device_id **return_id)
{
union acpi_operand_object *obj_desc;
struct acpica_device_id *hid;
struct acpi_pnp_device_id *hid;
u32 length;
acpi_status status;

Expand All @@ -94,16 +94,17 @@ acpi_ut_execute_HID(struct acpi_namespace_node *device_node,
/* Allocate a buffer for the HID */

hid =
ACPI_ALLOCATE_ZEROED(sizeof(struct acpica_device_id) +
ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) +
(acpi_size) length);
if (!hid) {
status = AE_NO_MEMORY;
goto cleanup;
}

/* Area for the string starts after DEVICE_ID struct */
/* Area for the string starts after PNP_DEVICE_ID struct */

hid->string = ACPI_ADD_PTR(char, hid, sizeof(struct acpica_device_id));
hid->string =
ACPI_ADD_PTR(char, hid, sizeof(struct acpi_pnp_device_id));

/* Convert EISAID to a string or simply copy existing string */

Expand Down Expand Up @@ -144,10 +145,10 @@ acpi_ut_execute_HID(struct acpi_namespace_node *device_node,

acpi_status
acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
struct acpica_device_id **return_id)
struct acpi_pnp_device_id **return_id)
{
union acpi_operand_object *obj_desc;
struct acpica_device_id *uid;
struct acpi_pnp_device_id *uid;
u32 length;
acpi_status status;

Expand All @@ -171,16 +172,17 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
/* Allocate a buffer for the UID */

uid =
ACPI_ALLOCATE_ZEROED(sizeof(struct acpica_device_id) +
ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) +
(acpi_size) length);
if (!uid) {
status = AE_NO_MEMORY;
goto cleanup;
}

/* Area for the string starts after DEVICE_ID struct */
/* Area for the string starts after PNP_DEVICE_ID struct */

uid->string = ACPI_ADD_PTR(char, uid, sizeof(struct acpica_device_id));
uid->string =
ACPI_ADD_PTR(char, uid, sizeof(struct acpi_pnp_device_id));

/* Convert an Integer to string, or just copy an existing string */

Expand Down Expand Up @@ -226,11 +228,11 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node,

acpi_status
acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
struct acpica_device_id_list **return_cid_list)
struct acpi_pnp_device_id_list **return_cid_list)
{
union acpi_operand_object **cid_objects;
union acpi_operand_object *obj_desc;
struct acpica_device_id_list *cid_list;
struct acpi_pnp_device_id_list *cid_list;
char *next_id_string;
u32 string_area_size;
u32 length;
Expand Down Expand Up @@ -288,22 +290,23 @@ acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
/*
* Now that we know the length of the CIDs, allocate return buffer:
* 1) Size of the base structure +
* 2) Size of the CID DEVICE_ID array +
* 2) Size of the CID PNP_DEVICE_ID array +
* 3) Size of the actual CID strings
*/
cid_list_size = sizeof(struct acpica_device_id_list) +
((count - 1) * sizeof(struct acpica_device_id)) + string_area_size;
cid_list_size = sizeof(struct acpi_pnp_device_id_list) +
((count - 1) * sizeof(struct acpi_pnp_device_id)) +
string_area_size;

cid_list = ACPI_ALLOCATE_ZEROED(cid_list_size);
if (!cid_list) {
status = AE_NO_MEMORY;
goto cleanup;
}

/* Area for CID strings starts after the CID DEVICE_ID array */
/* Area for CID strings starts after the CID PNP_DEVICE_ID array */

next_id_string = ACPI_CAST_PTR(char, cid_list->ids) +
((acpi_size) count * sizeof(struct acpica_device_id));
((acpi_size) count * sizeof(struct acpi_pnp_device_id));

/* Copy/convert the CIDs to the return buffer */

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ static void acpi_device_set_id(struct acpi_device *device)
{
acpi_status status;
struct acpi_device_info *info;
struct acpica_device_id_list *cid_list;
struct acpi_pnp_device_id_list *cid_list;
int i;

switch (device->device_type) {
Expand Down
12 changes: 6 additions & 6 deletions trunk/include/acpi/actypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1020,15 +1020,15 @@ u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported);

/* Structures used for device/processor HID, UID, CID */

struct acpica_device_id {
struct acpi_pnp_device_id {
u32 length; /* Length of string + null */
char *string;
};

struct acpica_device_id_list {
struct acpi_pnp_device_id_list {
u32 count; /* Number of IDs in Ids array */
u32 list_size; /* Size of list, including ID strings */
struct acpica_device_id ids[1]; /* ID array */
struct acpi_pnp_device_id ids[1]; /* ID array */
};

/*
Expand All @@ -1046,9 +1046,9 @@ struct acpi_device_info {
u8 lowest_dstates[5]; /* _sx_w values: 0xFF indicates not valid */
u32 current_status; /* _STA value */
u64 address; /* _ADR value */
struct acpica_device_id hardware_id; /* _HID value */
struct acpica_device_id unique_id; /* _UID value */
struct acpica_device_id_list compatible_id_list; /* _CID list <must be last> */
struct acpi_pnp_device_id hardware_id; /* _HID value */
struct acpi_pnp_device_id unique_id; /* _UID value */
struct acpi_pnp_device_id_list compatible_id_list; /* _CID list <must be last> */
};

/* Values for Flags field above (acpi_get_object_info) */
Expand Down

0 comments on commit 06cb8ae

Please sign in to comment.