aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/resources/rsirq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/resources/rsirq.c')
-rw-r--r--drivers/acpi/resources/rsirq.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/acpi/resources/rsirq.c b/drivers/acpi/resources/rsirq.c
index 7179b6243f5b..56043fee96cb 100644
--- a/drivers/acpi/resources/rsirq.c
+++ b/drivers/acpi/resources/rsirq.c
@@ -290,7 +290,7 @@ acpi_rs_extended_irq_resource(u8 * byte_stream_buffer,
290 290
291 ACPI_FUNCTION_TRACE("rs_extended_irq_resource"); 291 ACPI_FUNCTION_TRACE("rs_extended_irq_resource");
292 292
293 /* Point past the Descriptor to get the number of bytes consumed */ 293 /* Get the Descriptor Length field */
294 294
295 buffer += 1; 295 buffer += 1;
296 ACPI_MOVE_16_TO_16(&temp16, buffer); 296 ACPI_MOVE_16_TO_16(&temp16, buffer);
@@ -398,7 +398,7 @@ acpi_rs_extended_irq_resource(u8 * byte_stream_buffer,
398 /* Copy the string into the buffer */ 398 /* Copy the string into the buffer */
399 399
400 index = 0; 400 index = 0;
401 while (0x00 != *buffer) { 401 while (*buffer) {
402 *temp_ptr = *buffer; 402 *temp_ptr = *buffer;
403 403
404 temp_ptr += 1; 404 temp_ptr += 1;
@@ -408,7 +408,7 @@ acpi_rs_extended_irq_resource(u8 * byte_stream_buffer,
408 408
409 /* Add the terminating null */ 409 /* Add the terminating null */
410 410
411 *temp_ptr = 0x00; 411 *temp_ptr = 0;
412 output_struct->data.extended_irq.resource_source.string_length = 412 output_struct->data.extended_irq.resource_source.string_length =
413 index + 1; 413 index + 1;
414 414
@@ -420,7 +420,7 @@ acpi_rs_extended_irq_resource(u8 * byte_stream_buffer,
420 temp8 = (u8) (index + 1); 420 temp8 = (u8) (index + 1);
421 struct_size += ACPI_ROUND_UP_to_32_bITS(temp8); 421 struct_size += ACPI_ROUND_UP_to_32_bITS(temp8);
422 } else { 422 } else {
423 output_struct->data.extended_irq.resource_source.index = 0x00; 423 output_struct->data.extended_irq.resource_source.index = 0;
424 output_struct->data.extended_irq.resource_source.string_length = 424 output_struct->data.extended_irq.resource_source.string_length =
425 0; 425 0;
426 output_struct->data.extended_irq.resource_source.string_ptr = 426 output_struct->data.extended_irq.resource_source.string_ptr =
@@ -461,16 +461,15 @@ acpi_rs_extended_irq_stream(struct acpi_resource *linked_list,
461 u16 *length_field; 461 u16 *length_field;
462 u8 temp8 = 0; 462 u8 temp8 = 0;
463 u8 index; 463 u8 index;
464 char *temp_pointer = NULL;
465 464
466 ACPI_FUNCTION_TRACE("rs_extended_irq_stream"); 465 ACPI_FUNCTION_TRACE("rs_extended_irq_stream");
467 466
468 /* The descriptor field is static */ 467 /* Set the Descriptor Type field */
469 468
470 *buffer = 0x89; 469 *buffer = ACPI_RDESC_TYPE_EXTENDED_XRUPT;
471 buffer += 1; 470 buffer += 1;
472 471
473 /* Set a pointer to the Length field - to be filled in later */ 472 /* Save a pointer to the Length field - to be filled in later */
474 473
475 length_field = ACPI_CAST_PTR(u16, buffer); 474 length_field = ACPI_CAST_PTR(u16, buffer);
476 buffer += 2; 475 buffer += 2;
@@ -524,16 +523,14 @@ acpi_rs_extended_irq_stream(struct acpi_resource *linked_list,
524 (u8) linked_list->data.extended_irq.resource_source.index; 523 (u8) linked_list->data.extended_irq.resource_source.index;
525 buffer += 1; 524 buffer += 1;
526 525
527 temp_pointer = (char *)buffer;
528
529 /* Copy the string */ 526 /* Copy the string */
530 527
531 ACPI_STRCPY(temp_pointer, 528 ACPI_STRCPY((char *)buffer,
532 linked_list->data.extended_irq.resource_source. 529 linked_list->data.extended_irq.resource_source.
533 string_ptr); 530 string_ptr);
534 531
535 /* 532 /*
536 * Buffer needs to be set to the length of the sting + one for the 533 * Buffer needs to be set to the length of the string + one for the
537 * terminating null 534 * terminating null
538 */ 535 */
539 buffer += 536 buffer +=