summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Castet <castet.matthieu@free.fr>2005-03-25 12:03:15 -0500
committerLen Brown <len.brown@intel.com>2005-07-11 23:54:59 -0400
commitb008b8d7092053fc1f036cfc54dc11740cc424ed (patch)
tree4e5fbd235eb36500ef1c8a9cc8755f6048eecda2
parenta406d9e63e1d7088aad22565449de2e109300e5c (diff)
[ACPI] PNPACPI parse error
http://bugzilla.kernel.org/show_bug.cgi?id=3912 Written-by: matthieu castet <castet.matthieu@free.fr> Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index dd61e09029b1..ae3819ad7cf4 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -444,6 +444,7 @@ pnpacpi_parse_fixed_mem32_option(struct pnp_option *option,
struct acpipnp_parse_option_s {
struct pnp_option *option;
+ struct pnp_option *option_independent;
struct pnp_dev *dev;
};
@@ -507,7 +508,14 @@ static acpi_status pnpacpi_option_resource(struct acpi_resource *res,
parse_data->option = option;
break;
case ACPI_RSTYPE_END_DPF:
- return AE_CTRL_TERMINATE;
+ /*only one EndDependentFn is allowed*/
+ if (!parse_data->option_independent) {
+ pnp_warn("PnPACPI: more than one EndDependentFn");
+ return AE_ERROR;
+ }
+ parse_data->option = parse_data->option_independent;
+ parse_data->option_independent = NULL;
+ break;
default:
pnp_warn("PnPACPI: unknown resource type %d", res->id);
return AE_ERROR;
@@ -525,6 +533,7 @@ acpi_status pnpacpi_parse_resource_option_data(acpi_handle handle,
parse_data.option = pnp_register_independent_option(dev);
if (!parse_data.option)
return AE_ERROR;
+ parse_data.option_independent = parse_data.option;
parse_data.dev = dev;
status = acpi_walk_resources(handle, METHOD_NAME__PRS,
pnpacpi_option_resource, &parse_data);