linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch] PnPacpi parser fix
@ 2004-11-21 19:27 matthieu castet
  0 siblings, 0 replies; 2+ messages in thread
From: matthieu castet @ 2004-11-21 19:27 UTC (permalink / raw)
  To: Linux Kernel list

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

Hi,

this patch fix a bug in the pnpacpi parser : the pnpacpi parser supposed 
that are no resource after EndDependentFn.

Please apply.


Signed-Off-By: Matthieu Castet <castet.matthieu@free.fr>

[-- Attachment #2: pnpacpi_parser.patch --]
[-- Type: text/x-patch, Size: 1127 bytes --]

--- linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c.old	2004-11-12 22:55:10.000000000 +0100
+++ linux-2.6.9/drivers/pnp/pnpacpi/rsparser.c	2004-11-20 10:44:36.000000000 +0100
@@ -443,6 +443,7 @@
 
 struct acpipnp_parse_option_s {
 	struct pnp_option *option;
+	struct pnp_option *independent_option;
 	struct pnp_dev *dev;
 };
 
@@ -506,7 +507,15 @@
 			parse_data->option = option;	
 			break;
 		case ACPI_RSTYPE_END_DPF:
-			return AE_CTRL_TERMINATE;
+			/*only one EndDependentFn is allowed*/
+			if (!parse_data->independent_option) {
+				pnp_warn("PnPACPI: more than one EndDependentFn");
+				return AE_ERROR;
+			}
+			parse_data->option = parse_data->independent_option;
+			parse_data->independent_option = NULL;
+			break;
 		default:
 			pnp_warn("PnPACPI:Option type: %d not handle", res->id);
 			return AE_ERROR;
@@ -524,6 +533,7 @@
 	parse_data.option = pnp_register_independent_option(dev);
 	if (!parse_data.option)
 		return AE_ERROR;
+	parse_data.independent_option = parse_data.option;
 	parse_data.dev = dev;
 	status = acpi_walk_resources(handle, METHOD_NAME__PRS, 
 		pnpacpi_option_resource, &parse_data);

^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <4203AFC5.8070308@free.fr>]

end of thread, other threads:[~2005-02-05  9:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-21 19:27 [Patch] PnPacpi parser fix matthieu castet
     [not found] <4203AFC5.8070308@free.fr>
2005-02-05  9:07 ` [PATCH] PNPACPI " matthieu castet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).