diff options
Diffstat (limited to 'drivers/acpi/resources/rsxface.c')
-rw-r--r-- | drivers/acpi/resources/rsxface.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/drivers/acpi/resources/rsxface.c b/drivers/acpi/resources/rsxface.c index a9cdcbeb3432..83c944b8b097 100644 --- a/drivers/acpi/resources/rsxface.c +++ b/drivers/acpi/resources/rsxface.c | |||
@@ -49,6 +49,23 @@ | |||
49 | #define _COMPONENT ACPI_RESOURCES | 49 | #define _COMPONENT ACPI_RESOURCES |
50 | ACPI_MODULE_NAME ("rsxface") | 50 | ACPI_MODULE_NAME ("rsxface") |
51 | 51 | ||
52 | /* Local macros for 16,32-bit to 64-bit conversion */ | ||
53 | |||
54 | #define ACPI_COPY_FIELD(out, in, field) ((out)->field = (in)->field) | ||
55 | #define ACPI_COPY_ADDRESS(out, in) \ | ||
56 | ACPI_COPY_FIELD(out, in, resource_type); \ | ||
57 | ACPI_COPY_FIELD(out, in, producer_consumer); \ | ||
58 | ACPI_COPY_FIELD(out, in, decode); \ | ||
59 | ACPI_COPY_FIELD(out, in, min_address_fixed); \ | ||
60 | ACPI_COPY_FIELD(out, in, max_address_fixed); \ | ||
61 | ACPI_COPY_FIELD(out, in, attribute); \ | ||
62 | ACPI_COPY_FIELD(out, in, granularity); \ | ||
63 | ACPI_COPY_FIELD(out, in, min_address_range); \ | ||
64 | ACPI_COPY_FIELD(out, in, max_address_range); \ | ||
65 | ACPI_COPY_FIELD(out, in, address_translation_offset); \ | ||
66 | ACPI_COPY_FIELD(out, in, address_length); \ | ||
67 | ACPI_COPY_FIELD(out, in, resource_source); | ||
68 | |||
52 | 69 | ||
53 | /******************************************************************************* | 70 | /******************************************************************************* |
54 | * | 71 | * |
@@ -180,6 +197,7 @@ EXPORT_SYMBOL(acpi_get_current_resources); | |||
180 | * and the value of ret_buffer is undefined. | 197 | * and the value of ret_buffer is undefined. |
181 | * | 198 | * |
182 | ******************************************************************************/ | 199 | ******************************************************************************/ |
200 | |||
183 | #ifdef ACPI_FUTURE_USAGE | 201 | #ifdef ACPI_FUTURE_USAGE |
184 | acpi_status | 202 | acpi_status |
185 | acpi_get_possible_resources ( | 203 | acpi_get_possible_resources ( |
@@ -346,9 +364,8 @@ acpi_set_current_resources ( | |||
346 | ACPI_FUNCTION_TRACE ("acpi_set_current_resources"); | 364 | ACPI_FUNCTION_TRACE ("acpi_set_current_resources"); |
347 | 365 | ||
348 | 366 | ||
349 | /* | 367 | /* Must have a valid handle and buffer */ |
350 | * Must have a valid handle and buffer | 368 | |
351 | */ | ||
352 | if ((!device_handle) || | 369 | if ((!device_handle) || |
353 | (!in_buffer) || | 370 | (!in_buffer) || |
354 | (!in_buffer->pointer) || | 371 | (!in_buffer->pointer) || |
@@ -362,21 +379,6 @@ acpi_set_current_resources ( | |||
362 | EXPORT_SYMBOL(acpi_set_current_resources); | 379 | EXPORT_SYMBOL(acpi_set_current_resources); |
363 | 380 | ||
364 | 381 | ||
365 | #define ACPI_COPY_FIELD(out, in, field) ((out)->field = (in)->field) | ||
366 | #define ACPI_COPY_ADDRESS(out, in) \ | ||
367 | ACPI_COPY_FIELD(out, in, resource_type); \ | ||
368 | ACPI_COPY_FIELD(out, in, producer_consumer); \ | ||
369 | ACPI_COPY_FIELD(out, in, decode); \ | ||
370 | ACPI_COPY_FIELD(out, in, min_address_fixed); \ | ||
371 | ACPI_COPY_FIELD(out, in, max_address_fixed); \ | ||
372 | ACPI_COPY_FIELD(out, in, attribute); \ | ||
373 | ACPI_COPY_FIELD(out, in, granularity); \ | ||
374 | ACPI_COPY_FIELD(out, in, min_address_range); \ | ||
375 | ACPI_COPY_FIELD(out, in, max_address_range); \ | ||
376 | ACPI_COPY_FIELD(out, in, address_translation_offset); \ | ||
377 | ACPI_COPY_FIELD(out, in, address_length); \ | ||
378 | ACPI_COPY_FIELD(out, in, resource_source); | ||
379 | |||
380 | /****************************************************************************** | 382 | /****************************************************************************** |
381 | * | 383 | * |
382 | * FUNCTION: acpi_resource_to_address64 | 384 | * FUNCTION: acpi_resource_to_address64 |
@@ -408,14 +410,14 @@ acpi_resource_to_address64 ( | |||
408 | case ACPI_RSTYPE_ADDRESS16: | 410 | case ACPI_RSTYPE_ADDRESS16: |
409 | 411 | ||
410 | address16 = (struct acpi_resource_address16 *) &resource->data; | 412 | address16 = (struct acpi_resource_address16 *) &resource->data; |
411 | ACPI_COPY_ADDRESS(out, address16); | 413 | ACPI_COPY_ADDRESS (out, address16); |
412 | break; | 414 | break; |
413 | 415 | ||
414 | 416 | ||
415 | case ACPI_RSTYPE_ADDRESS32: | 417 | case ACPI_RSTYPE_ADDRESS32: |
416 | 418 | ||
417 | address32 = (struct acpi_resource_address32 *) &resource->data; | 419 | address32 = (struct acpi_resource_address32 *) &resource->data; |
418 | ACPI_COPY_ADDRESS(out, address32); | 420 | ACPI_COPY_ADDRESS (out, address32); |
419 | break; | 421 | break; |
420 | 422 | ||
421 | 423 | ||
@@ -434,4 +436,3 @@ acpi_resource_to_address64 ( | |||
434 | return (AE_OK); | 436 | return (AE_OK); |
435 | } | 437 | } |
436 | EXPORT_SYMBOL(acpi_resource_to_address64); | 438 | EXPORT_SYMBOL(acpi_resource_to_address64); |
437 | |||