diff options
Diffstat (limited to 'drivers/acpi/parser/psopcode.c')
-rw-r--r-- | drivers/acpi/parser/psopcode.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c index 9296e86761d7..3bf8105d6348 100644 --- a/drivers/acpi/parser/psopcode.c +++ b/drivers/acpi/parser/psopcode.c | |||
@@ -49,6 +49,8 @@ | |||
49 | #define _COMPONENT ACPI_PARSER | 49 | #define _COMPONENT ACPI_PARSER |
50 | ACPI_MODULE_NAME("psopcode") | 50 | ACPI_MODULE_NAME("psopcode") |
51 | 51 | ||
52 | const u8 acpi_gbl_argument_count[] = { 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 6 }; | ||
53 | |||
52 | /******************************************************************************* | 54 | /******************************************************************************* |
53 | * | 55 | * |
54 | * NAME: acpi_gbl_aml_op_info | 56 | * NAME: acpi_gbl_aml_op_info |
@@ -59,6 +61,7 @@ ACPI_MODULE_NAME("psopcode") | |||
59 | * the operand type. | 61 | * the operand type. |
60 | * | 62 | * |
61 | ******************************************************************************/ | 63 | ******************************************************************************/ |
64 | |||
62 | /* | 65 | /* |
63 | * Summary of opcode types/flags | 66 | * Summary of opcode types/flags |
64 | * | 67 | * |
@@ -176,6 +179,7 @@ ACPI_MODULE_NAME("psopcode") | |||
176 | AML_CREATE_QWORD_FIELD_OP | 179 | AML_CREATE_QWORD_FIELD_OP |
177 | 180 | ||
178 | ******************************************************************************/ | 181 | ******************************************************************************/ |
182 | |||
179 | /* | 183 | /* |
180 | * Master Opcode information table. A summary of everything we know about each | 184 | * Master Opcode information table. A summary of everything we know about each |
181 | * opcode, all in one place. | 185 | * opcode, all in one place. |
@@ -779,3 +783,25 @@ char *acpi_ps_get_opcode_name(u16 opcode) | |||
779 | 783 | ||
780 | #endif | 784 | #endif |
781 | } | 785 | } |
786 | |||
787 | /******************************************************************************* | ||
788 | * | ||
789 | * FUNCTION: acpi_ps_get_argument_count | ||
790 | * | ||
791 | * PARAMETERS: op_type - Type associated with the AML opcode | ||
792 | * | ||
793 | * RETURN: Argument count | ||
794 | * | ||
795 | * DESCRIPTION: Obtain the number of expected arguments for an AML opcode | ||
796 | * | ||
797 | ******************************************************************************/ | ||
798 | |||
799 | u8 acpi_ps_get_argument_count(u32 op_type) | ||
800 | { | ||
801 | |||
802 | if (op_type <= AML_TYPE_EXEC_6A_0T_1R) { | ||
803 | return (acpi_gbl_argument_count[op_type]); | ||
804 | } | ||
805 | |||
806 | return (0); | ||
807 | } | ||