diff options
author | Lv Zheng <lv.zheng@intel.com> | 2012-10-30 22:25:24 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2012-11-14 18:31:22 -0500 |
commit | 78e25fef2751434f38c7f711ecbf8762f79f7318 (patch) | |
tree | 7e449ecb6baaf24fe0460541df13e0d50f3da5a7 /drivers/acpi/acpica/utids.c | |
parent | f540fadf29a6987efbfa7daf10976935fd59ae7c (diff) |
ACPICA: Fix divergences of definition conflicts.
There are conflicts in the "acpi_device_id*" definitions between the
Linux and the ACPICA. The definitions of acpi_device_id* in ACPICA
have been changed to the "acpi_pnp_device_id*". This patch changes
the corresponding "acpica_device_id*" definitiions in the Linux.
This patch will not affect the generated vmlinx binary.
This will decrease 298 lines of 20120913 divergence.diff.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/utids.c')
-rw-r--r-- | drivers/acpi/acpica/utids.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c index 5d84e1954575..f18ac81c8399 100644 --- a/drivers/acpi/acpica/utids.c +++ b/drivers/acpi/acpica/utids.c | |||
@@ -67,10 +67,10 @@ ACPI_MODULE_NAME("utids") | |||
67 | ******************************************************************************/ | 67 | ******************************************************************************/ |
68 | acpi_status | 68 | acpi_status |
69 | acpi_ut_execute_HID(struct acpi_namespace_node *device_node, | 69 | acpi_ut_execute_HID(struct acpi_namespace_node *device_node, |
70 | struct acpica_device_id **return_id) | 70 | struct acpi_pnp_device_id **return_id) |
71 | { | 71 | { |
72 | union acpi_operand_object *obj_desc; | 72 | union acpi_operand_object *obj_desc; |
73 | struct acpica_device_id *hid; | 73 | struct acpi_pnp_device_id *hid; |
74 | u32 length; | 74 | u32 length; |
75 | acpi_status status; | 75 | acpi_status status; |
76 | 76 | ||
@@ -94,16 +94,17 @@ acpi_ut_execute_HID(struct acpi_namespace_node *device_node, | |||
94 | /* Allocate a buffer for the HID */ | 94 | /* Allocate a buffer for the HID */ |
95 | 95 | ||
96 | hid = | 96 | hid = |
97 | ACPI_ALLOCATE_ZEROED(sizeof(struct acpica_device_id) + | 97 | ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) + |
98 | (acpi_size) length); | 98 | (acpi_size) length); |
99 | if (!hid) { | 99 | if (!hid) { |
100 | status = AE_NO_MEMORY; | 100 | status = AE_NO_MEMORY; |
101 | goto cleanup; | 101 | goto cleanup; |
102 | } | 102 | } |
103 | 103 | ||
104 | /* Area for the string starts after DEVICE_ID struct */ | 104 | /* Area for the string starts after PNP_DEVICE_ID struct */ |
105 | 105 | ||
106 | hid->string = ACPI_ADD_PTR(char, hid, sizeof(struct acpica_device_id)); | 106 | hid->string = |
107 | ACPI_ADD_PTR(char, hid, sizeof(struct acpi_pnp_device_id)); | ||
107 | 108 | ||
108 | /* Convert EISAID to a string or simply copy existing string */ | 109 | /* Convert EISAID to a string or simply copy existing string */ |
109 | 110 | ||
@@ -144,10 +145,10 @@ cleanup: | |||
144 | 145 | ||
145 | acpi_status | 146 | acpi_status |
146 | acpi_ut_execute_UID(struct acpi_namespace_node *device_node, | 147 | acpi_ut_execute_UID(struct acpi_namespace_node *device_node, |
147 | struct acpica_device_id **return_id) | 148 | struct acpi_pnp_device_id **return_id) |
148 | { | 149 | { |
149 | union acpi_operand_object *obj_desc; | 150 | union acpi_operand_object *obj_desc; |
150 | struct acpica_device_id *uid; | 151 | struct acpi_pnp_device_id *uid; |
151 | u32 length; | 152 | u32 length; |
152 | acpi_status status; | 153 | acpi_status status; |
153 | 154 | ||
@@ -171,16 +172,17 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node, | |||
171 | /* Allocate a buffer for the UID */ | 172 | /* Allocate a buffer for the UID */ |
172 | 173 | ||
173 | uid = | 174 | uid = |
174 | ACPI_ALLOCATE_ZEROED(sizeof(struct acpica_device_id) + | 175 | ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) + |
175 | (acpi_size) length); | 176 | (acpi_size) length); |
176 | if (!uid) { | 177 | if (!uid) { |
177 | status = AE_NO_MEMORY; | 178 | status = AE_NO_MEMORY; |
178 | goto cleanup; | 179 | goto cleanup; |
179 | } | 180 | } |
180 | 181 | ||
181 | /* Area for the string starts after DEVICE_ID struct */ | 182 | /* Area for the string starts after PNP_DEVICE_ID struct */ |
182 | 183 | ||
183 | uid->string = ACPI_ADD_PTR(char, uid, sizeof(struct acpica_device_id)); | 184 | uid->string = |
185 | ACPI_ADD_PTR(char, uid, sizeof(struct acpi_pnp_device_id)); | ||
184 | 186 | ||
185 | /* Convert an Integer to string, or just copy an existing string */ | 187 | /* Convert an Integer to string, or just copy an existing string */ |
186 | 188 | ||
@@ -226,11 +228,11 @@ cleanup: | |||
226 | 228 | ||
227 | acpi_status | 229 | acpi_status |
228 | acpi_ut_execute_CID(struct acpi_namespace_node *device_node, | 230 | acpi_ut_execute_CID(struct acpi_namespace_node *device_node, |
229 | struct acpica_device_id_list **return_cid_list) | 231 | struct acpi_pnp_device_id_list **return_cid_list) |
230 | { | 232 | { |
231 | union acpi_operand_object **cid_objects; | 233 | union acpi_operand_object **cid_objects; |
232 | union acpi_operand_object *obj_desc; | 234 | union acpi_operand_object *obj_desc; |
233 | struct acpica_device_id_list *cid_list; | 235 | struct acpi_pnp_device_id_list *cid_list; |
234 | char *next_id_string; | 236 | char *next_id_string; |
235 | u32 string_area_size; | 237 | u32 string_area_size; |
236 | u32 length; | 238 | u32 length; |
@@ -288,11 +290,12 @@ acpi_ut_execute_CID(struct acpi_namespace_node *device_node, | |||
288 | /* | 290 | /* |
289 | * Now that we know the length of the CIDs, allocate return buffer: | 291 | * Now that we know the length of the CIDs, allocate return buffer: |
290 | * 1) Size of the base structure + | 292 | * 1) Size of the base structure + |
291 | * 2) Size of the CID DEVICE_ID array + | 293 | * 2) Size of the CID PNP_DEVICE_ID array + |
292 | * 3) Size of the actual CID strings | 294 | * 3) Size of the actual CID strings |
293 | */ | 295 | */ |
294 | cid_list_size = sizeof(struct acpica_device_id_list) + | 296 | cid_list_size = sizeof(struct acpi_pnp_device_id_list) + |
295 | ((count - 1) * sizeof(struct acpica_device_id)) + string_area_size; | 297 | ((count - 1) * sizeof(struct acpi_pnp_device_id)) + |
298 | string_area_size; | ||
296 | 299 | ||
297 | cid_list = ACPI_ALLOCATE_ZEROED(cid_list_size); | 300 | cid_list = ACPI_ALLOCATE_ZEROED(cid_list_size); |
298 | if (!cid_list) { | 301 | if (!cid_list) { |
@@ -300,10 +303,10 @@ acpi_ut_execute_CID(struct acpi_namespace_node *device_node, | |||
300 | goto cleanup; | 303 | goto cleanup; |
301 | } | 304 | } |
302 | 305 | ||
303 | /* Area for CID strings starts after the CID DEVICE_ID array */ | 306 | /* Area for CID strings starts after the CID PNP_DEVICE_ID array */ |
304 | 307 | ||
305 | next_id_string = ACPI_CAST_PTR(char, cid_list->ids) + | 308 | next_id_string = ACPI_CAST_PTR(char, cid_list->ids) + |
306 | ((acpi_size) count * sizeof(struct acpica_device_id)); | 309 | ((acpi_size) count * sizeof(struct acpi_pnp_device_id)); |
307 | 310 | ||
308 | /* Copy/convert the CIDs to the return buffer */ | 311 | /* Copy/convert the CIDs to the return buffer */ |
309 | 312 | ||