Skip to contentSkip to conversation

DSDT Override: Is this correct?

PATCH Nigel Cunningham 2 participants 2 messages Jan 14, 2003 1 message not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

Hi.

I'm just trying to override the DSDT using the 2.4.21-pre3 kernel, and had to stick a struct in front of the (acpi_table_header *) cast. Can I get confirmation that this the the right thing to do?

Regards,

Nigel

drivers/acpi/osl.c renamed from drivers/acpi/osl.c-dist +3 -1
@@ -25,6 +25,7 @@
  *
  */
 
+#include "dsdt_table.h"
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
@@ -221,7 +222,8 @@
 	if (!existing_table || !new_table)
 		return AE_BAD_PARAMETER;
 
-	*new_table = NULL;
+	*new_table = (strncmp(existing_table->signature, DSDT_SIG, 4)) ? NULL
\
+			: (struct acpi_table_header *) AmlCode;
 	return AE_OK;
 }
 

-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en

#2 lore raw
In reply to a message not in the archive

Hi,

Quoted 5 lines · Nigel Cunningham

Hi.

I'm just trying to override the DSDT using the 2.4.21-pre3 kernel, and had to stick a struct in front of the (acpi_table_header *) cast. Can I get confirmation that this the the right thing to do?

In the meantime, yes.

Signature · 11 lines
Ducrot Bruno

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en