Fixed a couple of size calculation issues with the variable-length
Start Dependent resource descriptor.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
switch (resource->type) {
case ACPI_RESOURCE_TYPE_IRQ:
+ /* Length can be 3 or 2 */
+
if (resource->data.irq.descriptor_length == 2) {
total_size--;
}
break;
+ case ACPI_RESOURCE_TYPE_START_DEPENDENT:
+
+ /* Length can be 1 or 0 */
+
+ if (resource->data.irq.descriptor_length == 0) {
+ total_size--;
+ }
+ break;
+
case ACPI_RESOURCE_TYPE_VENDOR:
/*
* Vendor Defined Resource:
/* Reset length to 1 byte (descriptor with flags byte) */
- {ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq)},
+ {ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_start_dependent)},
/*
* All done if flags byte is necessary -- if either priority value