Print this page
acpica-unix2-20130823
PANKOVs restructure

@@ -18,17 +18,18 @@
  *
  * CDDL HEADER END
  */
 /*
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2013 PALO, Richard. All rights reserved.
  */
 
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/cmn_err.h>
 #include <sys/promif.h>
-#include <sys/acpi/acpi.h>
+#include <acpica/include/acpi.h>
 #include <sys/acpica.h>
 #include <sys/sunddi.h>
 #include <sys/ddi.h>
 #include <sys/ddi_impldefs.h>
 #include <sys/pci.h>

@@ -486,16 +487,16 @@
                         ACPI_RESOURCE *endtag;
                         /*
                          * Allocate enough room for this resource entry
                          * and one end tag following it
                          */
-                        srs_len = resp->Length + sizeof (*endtag);
+                        srs_len = resp->Length + ACPI_RS_SIZE_NO_DATA;
                         srsp = kmem_zalloc(srs_len, KM_SLEEP);
                         bcopy(resp, srsp, resp->Length);
                         endtag = ACPI_NEXT_RESOURCE(srsp);
                         endtag->Type = ACPI_RESOURCE_TYPE_END_TAG;
-                        endtag->Length = 0;
+                        endtag->Length = ACPI_RS_SIZE_NO_DATA;
                         break;  /* drop out of the loop */
                 }
         }
 
         /*