]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ACPICA: Fixes for size of StartDependent resource descriptor
authorBob Moore <robert.moore@intel.com>
Thu, 10 Apr 2008 15:06:44 +0000 (19:06 +0400)
committerLen Brown <len.brown@intel.com>
Tue, 22 Apr 2008 23:09:25 +0000 (19:09 -0400)
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>
drivers/acpi/resources/rscalc.c
drivers/acpi/resources/rsio.c

index db0a835e3317ec1b408e78203146400d718e36e3..d801823de01605b338631ac0d7907f87a5db5e80 100644 (file)
@@ -213,11 +213,22 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed)
                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:
index 50f3acdd9c8e0c1b93833b9fd8109c4826e96ee6..610d7c2101f211a66c9470441a917afe1837b9d3 100644 (file)
@@ -268,7 +268,7 @@ struct acpi_rsconvert_info acpi_rs_set_start_dpf[10] = {
 
        /* 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