Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0444e8f6 authored by Bob Moore's avatar Bob Moore Committed by Len Brown
Browse files

ACPICA: Fix: Predefined object repair executed only once

This fixes a problem where the code that attempts to repair/convert
an object of incorrect type is only executed on the first time the
predefined method is called. The mechanism that disables warnings
on subsequent calls was interfering with the repair mechanism.
ACPICA BZ 781.

http://acpica.org/bugzilla/show_bug.cgi?id=781



Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent cf02cd47
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -369,6 +369,19 @@ union acpi_predefined_info {
	struct acpi_package_info3 ret_info3;
};

/* Data block used during object validation */

struct acpi_predefined_data {
	char *pathname;
	const union acpi_predefined_info *predefined;
	u32 flags;
	u8 node_flags;
};

/* Defines for Flags field above */

#define ACPI_OBJECT_REPAIRED    1

/*
 * Bitmapped return value types
 * Note: the actual data types must be contiguous, a loop in nspredef.c
+2 −0
Original line number Diff line number Diff line
@@ -340,6 +340,7 @@
 */
#define ACPI_ERROR_NAMESPACE(s, e)      acpi_ns_report_error (AE_INFO, s, e);
#define ACPI_ERROR_METHOD(s, n, p, e)   acpi_ns_report_method_error (AE_INFO, s, n, p, e);
#define ACPI_WARN_PREDEFINED(plist)     acpi_ut_predefined_warning plist

#else

@@ -347,6 +348,7 @@

#define ACPI_ERROR_NAMESPACE(s, e)
#define ACPI_ERROR_METHOD(s, n, p, e)
#define ACPI_WARN_PREDEFINED(plist)
#endif		/* ACPI_NO_ERROR_MESSAGES */

/*
+6 −0
Original line number Diff line number Diff line
@@ -475,6 +475,12 @@ u8 acpi_ut_valid_acpi_char(char character, u32 position);
acpi_status
acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer);

void ACPI_INTERNAL_VAR_XFACE
acpi_ut_predefined_warning(const char *module_name,
			   u32 line_number,
			   char *pathname,
			   u8 node_flags, const char *format, ...);

/* Values for Base above (16=Hex, 10=Decimal) */

#define ACPI_ANY_BASE        0