[ACPI-sppt] howto patch osl.c
Thomas Glomann <[email protected]> Mon, 22 Sep 2003 11:17:27 +0000
| Newsgroups | gmane.linux.acpi.support |
|---|---|
| Message-ID | <[email protected]> |
hi,
i want to upgrade to a 2.4.22 kernel. (the ck - patched kernel from the gentoo
portage tree)
I applied the latest acpi patch (from acpi.sf.net) . had some rejects but
fixed that manually.
Then I need to patch the drivers/acpi/osl.c so that I can use a custom DSDT
table.
the page at http://www.cpqlinux.com/acpi-howto.html does provide a patch,
which i apllied manually. But there is something wrong at line 235.
make gives me the following output :
##################
make[3]: Entering directory `/usr/src/linux-2.4.22-ck2/drivers/acpi'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-ck2/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer
-pipe -mpreferred-stack-boundary=2 -march=i686 -Os -nostdinc -iwithprefix
include -DKBUILD_BASENAME=osl -c -o osl.o osl.c
osl.c: In function `acpi_os_table_override':
osl.c:235: `acpi_table_header' undeclared (first use in this function)
osl.c:235: (Each undeclared identifier is reported only once
osl.c:235: for each function it appears in.)
osl.c:235: parse error before ')' token
osl.c:235: warning: statement with no effect
make[3]: *** [osl.o] Error 1
###################
my patched osl.c looks like :
###################
acpi_status
acpi_os_table_override (struct acpi_table_header *existing_table,
struct acpi_table_header **new_table)
{
if (!existing_table || !new_table)
return AE_BAD_PARAMETER;
if (strncmp(existing_table->signature, "DSDT", 4) == 0)
*new_table = (acpi_table_header*)AmlCode;
else
*new_table = NULL;
return AE_OK;
}
###################
What is wrong with that piece of code? I think I remember that the page at
http://www.cpqlinux.com/acpi-howto.html once said that you have to change the
"struct" with somthing else. But this information is longer available at this
page.
I am not a c programmer so I hope someone can help me out here.
Thanks alot !!!
Thomas
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf