rscalc.c (2b72693066a867ac073a657e871bb64391b4ffdb) rscalc.c (97028ce6fca0fec53ee71e2fd5acfb2dc8430f1f)
1/*******************************************************************************
2 *
3 * Module Name: rscalc - Calculate stream and list lengths
4 *
5 ******************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2017, Intel Corp.

--- 361 unchanged lines hidden (view full) ---

370 resource_source.
371 string_length +
372 resource->data.
373 i2c_serial_bus.
374 vendor_length);
375
376 break;
377
1/*******************************************************************************
2 *
3 * Module Name: rscalc - Calculate stream and list lengths
4 *
5 ******************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2017, Intel Corp.

--- 361 unchanged lines hidden (view full) ---

370 resource_source.
371 string_length +
372 resource->data.
373 i2c_serial_bus.
374 vendor_length);
375
376 break;
377
378 case ACPI_RESOURCE_TYPE_PIN_CONFIG:
379
380 total_size = (acpi_rs_length)(total_size +
381 (resource->data.
382 pin_config.
383 pin_table_length * 2) +
384 resource->data.pin_config.
385 resource_source.
386 string_length +
387 resource->data.pin_config.
388 vendor_length);
389
390 break;
391
378 default:
379
380 break;
381 }
382
383 /* Update the total */
384
385 aml_size_needed += total_size;

--- 190 unchanged lines hidden (view full) ---

576 minimum_aml_resource_length =
577 acpi_gbl_resource_aml_serial_bus_sizes
578 [aml_resource->common_serial_bus.type];
579 extra_struct_bytes +=
580 aml_resource->common_serial_bus.resource_length -
581 minimum_aml_resource_length;
582 break;
583
392 default:
393
394 break;
395 }
396
397 /* Update the total */
398
399 aml_size_needed += total_size;

--- 190 unchanged lines hidden (view full) ---

590 minimum_aml_resource_length =
591 acpi_gbl_resource_aml_serial_bus_sizes
592 [aml_resource->common_serial_bus.type];
593 extra_struct_bytes +=
594 aml_resource->common_serial_bus.resource_length -
595 minimum_aml_resource_length;
596 break;
597
598 case ACPI_RESOURCE_NAME_PIN_CONFIG:
599
600 /* Vendor data is optional */
601
602 if (aml_resource->pin_config.vendor_length) {
603 extra_struct_bytes +=
604 aml_resource->pin_config.vendor_offset -
605 aml_resource->pin_config.pin_table_offset +
606 aml_resource->pin_config.vendor_length;
607 } else {
608 extra_struct_bytes +=
609 aml_resource->large_header.resource_length +
610 sizeof(struct aml_resource_large_header) -
611 aml_resource->pin_config.pin_table_offset;
612 }
613 break;
614
584 default:
585
586 break;
587 }
588
589 /*
590 * Update the required buffer size for the internal descriptor structs
591 *

--- 164 unchanged lines hidden ---
615 default:
616
617 break;
618 }
619
620 /*
621 * Update the required buffer size for the internal descriptor structs
622 *

--- 164 unchanged lines hidden ---