diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 14:52:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 14:52:52 -0400 |
commit | 08acd4f8af42affd8cbed81cc1b69fa12ddb213f (patch) | |
tree | 988d15db6233b20db6a500cd5f590c6d2041462d /drivers/acpi/parser/psopcode.c | |
parent | ccf2779544eecfcc5447e2028d1029b6d4ff7bb6 (diff) | |
parent | 008238b54ac2350babf195084ecedbcf7851a202 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (179 commits)
ACPI: Fix acpi_processor_idle and idle= boot parameters interaction
acpi: fix section mismatch warning in pnpacpi
intel_menlo: fix build warning
ACPI: Cleanup: Remove unneeded, multiple local dummy variables
ACPI: video - fix permissions on some proc entries
ACPI: video - properly handle errors when registering proc elements
ACPI: video - do not store invalid entries in attached_array list
ACPI: re-name acpi_pm_ops to acpi_suspend_ops
ACER_WMI/ASUS_LAPTOP: fix build bug
thinkpad_acpi: fix possible NULL pointer dereference if kstrdup failed
ACPI: check a return value correctly in acpi_power_get_context()
#if 0 acpi/bay.c:eject_removable_drive()
eeepc-laptop: add hwmon fan control
eeepc-laptop: add backlight
eeepc-laptop: add base driver
ACPI: thinkpad-acpi: bump up version to 0.20
ACPI: thinkpad-acpi: fix selects in Kconfig
ACPI: thinkpad-acpi: use a private workqueue
ACPI: thinkpad-acpi: fluff really minor fix
ACPI: thinkpad-acpi: use uppercase for "LED" on user documentation
...
Fixed conflicts in drivers/acpi/video.c and drivers/misc/intel_menlow.c
manually.
Diffstat (limited to 'drivers/acpi/parser/psopcode.c')
-rw-r--r-- | drivers/acpi/parser/psopcode.c | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c index 9296e86761d7..f425ab30eae8 100644 --- a/drivers/acpi/parser/psopcode.c +++ b/drivers/acpi/parser/psopcode.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2007, R. Byron Moore | 8 | * Copyright (C) 2000 - 2008, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -49,6 +49,9 @@ | |||
49 | #define _COMPONENT ACPI_PARSER | 49 | #define _COMPONENT ACPI_PARSER |
50 | ACPI_MODULE_NAME("psopcode") | 50 | ACPI_MODULE_NAME("psopcode") |
51 | 51 | ||
52 | static const u8 acpi_gbl_argument_count[] = | ||
53 | { 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 6 }; | ||
54 | |||
52 | /******************************************************************************* | 55 | /******************************************************************************* |
53 | * | 56 | * |
54 | * NAME: acpi_gbl_aml_op_info | 57 | * NAME: acpi_gbl_aml_op_info |
@@ -59,6 +62,7 @@ ACPI_MODULE_NAME("psopcode") | |||
59 | * the operand type. | 62 | * the operand type. |
60 | * | 63 | * |
61 | ******************************************************************************/ | 64 | ******************************************************************************/ |
65 | |||
62 | /* | 66 | /* |
63 | * Summary of opcode types/flags | 67 | * Summary of opcode types/flags |
64 | * | 68 | * |
@@ -176,6 +180,7 @@ ACPI_MODULE_NAME("psopcode") | |||
176 | AML_CREATE_QWORD_FIELD_OP | 180 | AML_CREATE_QWORD_FIELD_OP |
177 | 181 | ||
178 | ******************************************************************************/ | 182 | ******************************************************************************/ |
183 | |||
179 | /* | 184 | /* |
180 | * Master Opcode information table. A summary of everything we know about each | 185 | * Master Opcode information table. A summary of everything we know about each |
181 | * opcode, all in one place. | 186 | * opcode, all in one place. |
@@ -515,9 +520,10 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = { | |||
515 | AML_TYPE_NAMED_FIELD, | 520 | AML_TYPE_NAMED_FIELD, |
516 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD), | 521 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD), |
517 | /* 5F */ ACPI_OP("BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP, | 522 | /* 5F */ ACPI_OP("BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP, |
518 | ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, | 523 | ACPI_TYPE_LOCAL_BANK_FIELD, AML_CLASS_NAMED_OBJECT, |
519 | AML_TYPE_NAMED_FIELD, | 524 | AML_TYPE_NAMED_FIELD, |
520 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD), | 525 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD | |
526 | AML_DEFER), | ||
521 | 527 | ||
522 | /* Internal opcodes that map to invalid AML opcodes */ | 528 | /* Internal opcodes that map to invalid AML opcodes */ |
523 | 529 | ||
@@ -619,9 +625,9 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = { | |||
619 | AML_TYPE_EXEC_6A_0T_1R, AML_FLAGS_EXEC_6A_0T_1R), | 625 | AML_TYPE_EXEC_6A_0T_1R, AML_FLAGS_EXEC_6A_0T_1R), |
620 | /* 7C */ ACPI_OP("DataTableRegion", ARGP_DATA_REGION_OP, | 626 | /* 7C */ ACPI_OP("DataTableRegion", ARGP_DATA_REGION_OP, |
621 | ARGI_DATA_REGION_OP, ACPI_TYPE_REGION, | 627 | ARGI_DATA_REGION_OP, ACPI_TYPE_REGION, |
622 | AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, | 628 | AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_COMPLEX, |
623 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | | 629 | AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | |
624 | AML_NSNODE | AML_NAMED), | 630 | AML_NSNODE | AML_NAMED | AML_DEFER), |
625 | /* 7D */ ACPI_OP("[EvalSubTree]", ARGP_SCOPE_OP, ARGI_SCOPE_OP, | 631 | /* 7D */ ACPI_OP("[EvalSubTree]", ARGP_SCOPE_OP, ARGI_SCOPE_OP, |
626 | ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, | 632 | ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, |
627 | AML_TYPE_NAMED_NO_OBJ, | 633 | AML_TYPE_NAMED_NO_OBJ, |
@@ -779,3 +785,25 @@ char *acpi_ps_get_opcode_name(u16 opcode) | |||
779 | 785 | ||
780 | #endif | 786 | #endif |
781 | } | 787 | } |
788 | |||
789 | /******************************************************************************* | ||
790 | * | ||
791 | * FUNCTION: acpi_ps_get_argument_count | ||
792 | * | ||
793 | * PARAMETERS: op_type - Type associated with the AML opcode | ||
794 | * | ||
795 | * RETURN: Argument count | ||
796 | * | ||
797 | * DESCRIPTION: Obtain the number of expected arguments for an AML opcode | ||
798 | * | ||
799 | ******************************************************************************/ | ||
800 | |||
801 | u8 acpi_ps_get_argument_count(u32 op_type) | ||
802 | { | ||
803 | |||
804 | if (op_type <= AML_TYPE_EXEC_6A_0T_1R) { | ||
805 | return (acpi_gbl_argument_count[op_type]); | ||
806 | } | ||
807 | |||
808 | return (0); | ||
809 | } | ||