PATCH for 2.3.13-pre4 : APM & bogus init.h

Thierry Vignaud (tvignaud@mandrakesoft.com)
Wed, 04 Aug 1999 08:02:41 +0000


This is a multi-part message in MIME format.
--------------E89121FA59F2578A36A7180D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi.

I've just tested pre-2.3.13-4

First, i'v a bug with 2.3.13-pre3 with the amount of buffer (I've 128Mb
RAM)

$ free
total used free shared buffers
cached
Mem: 127332 122236 5096 81060 4192792
71920
-/+ buffers/cache: 51828 75504
Swap: 136512 2192 134320

2) the apm code won't compile.
Here is a patch fixing it. It also fix a typo in init.h (defnit instead
if define)

-- 
MandrakeSoft          http://www.mandrakesoft.com/
	somewhere between the playstation and the super cray
			         	 --Thierry
--------------E89121FA59F2578A36A7180D
Content-Type: text/plain; charset=us-ascii;
 name="apm.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="apm.diff"

diff -ru old/arch/i386/kernel/apm.c linux/arch/i386/kernel/apm.c --- old/arch/i386/kernel/apm.c Wed Aug 4 09:53:22 1999 +++ linux/arch/i386/kernel/apm.c Wed Aug 4 09:44:33 1999 @@ -284,6 +284,7 @@ extern int apm_register_callback(int (*)(apm_event_t)); extern void apm_unregister_callback(int (*)(apm_event_t)); +static int hlt_counter; /* * Local variables @@ -1227,7 +1228,6 @@ unsigned short bx; unsigned short cx; unsigned short dx; - unsigned short nbat; unsigned short error; unsigned short ac_line_status = 0xff; unsigned short battery_status = 0xff; @@ -1428,7 +1428,7 @@ * In short, if something bad happens, at least we have a choice * of just killing the apm thread.. */ -static int __init apm_init(void) +static void __init apm_init(void) { static struct proc_dir_entry *ent; diff -ru old/arch/i386/kernel/process.c linux/arch/i386/kernel/process.c --- old/arch/i386/kernel/process.c Wed Aug 4 09:53:22 1999 +++ linux/arch/i386/kernel/process.c Wed Aug 4 09:37:26 1999 @@ -54,12 +54,6 @@ /* * We'll get there.. */ -#ifdef CONFIG_APM -#define powermanagement_idle() do { } while (0) -#else -#define powermanagement_idle() do { } while (0) -#endif - static int hlt_counter=0; void disable_hlt(void) diff -ru old/include/linux/apm_bios.h linux/include/linux/apm_bios.h --- old/include/linux/apm_bios.h Wed Aug 4 09:53:28 1999 +++ linux/include/linux/apm_bios.h Wed Aug 4 09:40:37 1999 @@ -19,6 +19,15 @@ typedef unsigned short apm_event_t; typedef unsigned short apm_eventinfo_t; +#ifdef CONFIG_APM +#define powermanagement_idle() do { } while (0) +#else +#define powermanagement_idle() do { } while (0) +#endif +extern int hlt_counter; + + + #ifdef __KERNEL__ #define APM_40 0x40 diff -ru old/include/linux/init.h linux/include/linux/init.h --- old/include/linux/init.h Wed Aug 4 09:53:28 1999 +++ linux/include/linux/init.h Wed Aug 4 09:45:44 1999 @@ -107,7 +107,7 @@ #define __initdata #define __exitdata #define __initfunc(__arginit) __arginit -#defint __initcall +#define __initcall /* For assembly routines */ #define __INIT #define __FINIT

--------------E89121FA59F2578A36A7180D--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/