]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/acpica/nspredef.c
Merge branch 'omap-pool'
[linux-2.6-omap-h63xx.git] / drivers / acpi / acpica / nspredef.c
index 452703290d35e81bff9b98d4c706520c5c0a64a8..d9e8cbc6e679732d9a362d71f604a51d1683d223 100644 (file)
@@ -79,7 +79,9 @@ acpi_ns_check_package(char *pathname,
 static acpi_status
 acpi_ns_check_package_elements(char *pathname,
                               union acpi_operand_object **elements,
-                              u8 type1, u32 count1, u8 type2, u32 count2);
+                              u8 type1,
+                              u32 count1,
+                              u8 type2, u32 count2, u32 start_index);
 
 static acpi_status
 acpi_ns_check_object_type(char *pathname,
@@ -221,7 +223,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
 
        /* For returned Package objects, check the type of all sub-objects */
 
-       if (ACPI_GET_OBJECT_TYPE(return_object) == ACPI_TYPE_PACKAGE) {
+       if (return_object->common.type == ACPI_TYPE_PACKAGE) {
                status =
                    acpi_ns_check_package(pathname, return_object_ptr,
                                          predefined);
@@ -302,7 +304,8 @@ acpi_ns_check_parameter_count(char *pathname,
                if ((user_param_count != required_params_current) &&
                    (user_param_count != required_params_old)) {
                        ACPI_WARNING((AE_INFO,
-                                     "%s: Parameter count mismatch - caller passed %d, ACPI requires %d",
+                                     "%s: Parameter count mismatch - "
+                                     "caller passed %d, ACPI requires %d",
                                      pathname, user_param_count,
                                      required_params_current));
                }
@@ -472,7 +475,7 @@ acpi_ns_check_package(char *pathname,
                                                        package->ret_info.
                                                        object_type2,
                                                        package->ret_info.
-                                                       count2);
+                                                       count2, 0);
                if (ACPI_FAILURE(status)) {
                        return (status);
                }
@@ -623,7 +626,7 @@ acpi_ns_check_package(char *pathname,
                                                                   object_type2,
                                                                   package->
                                                                   ret_info.
-                                                                  count2);
+                                                                  count2, 0);
                                if (ACPI_FAILURE(status)) {
                                        return (status);
                                }
@@ -672,7 +675,8 @@ acpi_ns_check_package(char *pathname,
                                                                   object_type1,
                                                                   sub_package->
                                                                   package.
-                                                                  count, 0, 0);
+                                                                  count, 0, 0,
+                                                                  0);
                                if (ACPI_FAILURE(status)) {
                                        return (status);
                                }
@@ -710,7 +714,8 @@ acpi_ns_check_package(char *pathname,
                                                                   ret_info.
                                                                   object_type1,
                                                                   (expected_count
-                                                                   - 1), 0, 0);
+                                                                   - 1), 0, 0,
+                                                                  1);
                                if (ACPI_FAILURE(status)) {
                                        return (status);
                                }
@@ -758,6 +763,7 @@ acpi_ns_check_package(char *pathname,
  *              Count1          - Count for first group
  *              Type2           - Object type for second group
  *              Count2          - Count for second group
+ *              start_index     - Start of the first group of elements
  *
  * RETURN:      Status
  *
@@ -769,7 +775,9 @@ acpi_ns_check_package(char *pathname,
 static acpi_status
 acpi_ns_check_package_elements(char *pathname,
                               union acpi_operand_object **elements,
-                              u8 type1, u32 count1, u8 type2, u32 count2)
+                              u8 type1,
+                              u32 count1,
+                              u8 type2, u32 count2, u32 start_index)
 {
        union acpi_operand_object **this_element = elements;
        acpi_status status;
@@ -782,7 +790,7 @@ acpi_ns_check_package_elements(char *pathname,
         */
        for (i = 0; i < count1; i++) {
                status = acpi_ns_check_object_type(pathname, this_element,
-                                                  type1, i);
+                                                  type1, i + start_index);
                if (ACPI_FAILURE(status)) {
                        return (status);
                }
@@ -791,7 +799,8 @@ acpi_ns_check_package_elements(char *pathname,
 
        for (i = 0; i < count2; i++) {
                status = acpi_ns_check_object_type(pathname, this_element,
-                                                  type2, (i + count1));
+                                                  type2,
+                                                  (i + count1 + start_index));
                if (ACPI_FAILURE(status)) {
                        return (status);
                }
@@ -858,7 +867,7 @@ acpi_ns_check_object_type(char *pathname,
         * from all of the predefined names (including elements of returned
         * packages)
         */
-       switch (ACPI_GET_OBJECT_TYPE(return_object)) {
+       switch (return_object->common.type) {
        case ACPI_TYPE_INTEGER:
                return_btype = ACPI_RTYPE_INTEGER;
                break;
@@ -901,7 +910,7 @@ acpi_ns_check_object_type(char *pathname,
 
        /* For reference objects, check that the reference type is correct */
 
-       if (ACPI_GET_OBJECT_TYPE(return_object) == ACPI_TYPE_LOCAL_REFERENCE) {
+       if (return_object->common.type == ACPI_TYPE_LOCAL_REFERENCE) {
                status = acpi_ns_check_reference(pathname, return_object);
        }
 
@@ -974,7 +983,8 @@ acpi_ns_check_reference(char *pathname,
        }
 
        ACPI_WARNING((AE_INFO,
-                     "%s: Return type mismatch - unexpected reference object type [%s] %2.2X",
+                     "%s: Return type mismatch - "
+                     "unexpected reference object type [%s] %2.2X",
                      pathname, acpi_ut_get_reference_name(return_object),
                      return_object->reference.class));
 
@@ -1006,7 +1016,7 @@ acpi_ns_repair_object(u32 expected_btypes,
        union acpi_operand_object *new_object;
        acpi_size length;
 
-       switch (ACPI_GET_OBJECT_TYPE(return_object)) {
+       switch (return_object->common.type) {
        case ACPI_TYPE_BUFFER:
 
                if (!(expected_btypes & ACPI_RTYPE_STRING)) {