Re: [ACPI-sppt] howto patch osl.c
Ducrot Bruno <[email protected]> Mon, 22 Sep 2003 11:49:48 +0200
| Newsgroups | gmane.linux.acpi.support |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Sep 22, 2003 at 11:17:27AM +0000, Thomas Glomann wrote:
> 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;
> }
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 = (struct acpi_table_header*)AmlCode;
else
*new_table = NULL;
return AE_OK;
}
--
Ducrot Bruno
-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf