|
From: Peter K. <pk...@us...> - 2001-03-08 15:27:36
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bluetooth.c 1.144 1.145=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
module_init() and module_exit() needs to be defined differently
depending on whether this is compiled as a module or not.
The diff of the modified file(s):
--- bluetooth.c 2001/03/07 19:34:58 1.144
+++ bluetooth.c 2001/03/08 15:29:21 1.145
@@ -52,8 +52,13 @@
#include <linux/timer.h>
=20
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)
+# ifdef MODULE
# define module_init(x) int init_module(void) { return x(); }
# define module_exit(x) void cleanup_module(void) { x(); }
+# else
+# define module_init(x) int x##_module(void) { return x(); }
+# define module_exit(x) void x##_module(void) { x(); }
+# endif
# define __init
# define __exit
#else
@@ -2552,6 +2557,7 @@
}
=20
/************************ MODULE STUFF ***********************************=
***/
+
#if defined(MODULE) || defined(__KERNEL__)
=20
static void
@@ -2601,8 +2607,10 @@
=20=09
DSYS("Bluetooth Driver unregistered\n");
}
+
module_init(bt_init);
module_exit(bt_exit);
+
#endif /* MODULE */
=20
/****************** END OF FILE bluetooth.c ******************************=
***/
|