aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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,
444 444
445struct acpipnp_parse_option_s { 445struct acpipnp_parse_option_s {
446 struct pnp_option *option; 446 struct pnp_option *option;
447 struct pnp_option *option_independent;
447 struct pnp_dev *dev; 448 struct pnp_dev *dev;
448}; 449};
449 450
@@ -507,7 +508,14 @@ static acpi_status pnpacpi_option_resource(struct acpi_resource *res,
507 parse_data->option = option; 508 parse_data->option = option;
508 break; 509 break;
509 case ACPI_RSTYPE_END_DPF: 510 case ACPI_RSTYPE_END_DPF:
510 return AE_CTRL_TERMINATE; 511 /*only one EndDependentFn is allowed*/
512 if (!parse_data->option_independent) {
513 pnp_warn("PnPACPI: more than one EndDependentFn");
514 return AE_ERROR;
515 }
516 parse_data->option = parse_data->option_independent;
517 parse_data->option_independent = NULL;
518 break;
511 default: 519 default:
512 pnp_warn("PnPACPI: unknown resource type %d", res->id); 520 pnp_warn("PnPACPI: unknown resource type %d", res->id);
513 return AE_ERROR; 521 return AE_ERROR;
@@ -525,6 +533,7 @@ acpi_status pnpacpi_parse_resource_option_data(acpi_handle handle,
525 parse_data.option = pnp_register_independent_option(dev); 533 parse_data.option = pnp_register_independent_option(dev);
526 if (!parse_data.option) 534 if (!parse_data.option)
527 return AE_ERROR; 535 return AE_ERROR;
536 parse_data.option_independent = parse_data.option;
528 parse_data.dev = dev; 537 parse_data.dev = dev;
529 status = acpi_walk_resources(handle, METHOD_NAME__PRS, 538 status = acpi_walk_resources(handle, METHOD_NAME__PRS,
530 pnpacpi_option_resource, &parse_data); 539 pnpacpi_option_resource, &parse_data);