Re: [PATCH] Make it possible to compile in the Bluetooth subsystem

From: Linus Torvalds (torvalds@transmeta.com)
Date: Mon Oct 07 2002 - 15:51:28 EST


On Mon, 7 Oct 2002, Linus Torvalds wrote:
>
> Looks good, but you should _not_ remove the "static". Please keep the init
> functions static, they will be explicitly exported to the stuff that cares
> (and nobody else) by the "module_init()" thing anyway.

In other words, I think the patch should be just this instead..

                Linus

diff -Nru a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
--- a/net/bluetooth/af_bluetooth.c Mon Oct 7 22:16:14 2002
+++ b/net/bluetooth/af_bluetooth.c Mon Oct 7 22:16:14 2002
@@ -356,11 +356,9 @@
         remove_proc_entry("bluetooth", NULL);
 }
 
-#ifdef MODULE
 module_init(bluez_init);
 module_exit(bluez_cleanup);
 
 MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
 MODULE_DESCRIPTION("BlueZ Core ver " VERSION);
 MODULE_LICENSE("GPL");
-#endif
diff -Nru a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
--- a/net/bluetooth/rfcomm/tty.c Mon Oct 7 22:16:14 2002
+++ b/net/bluetooth/rfcomm/tty.c Mon Oct 7 22:16:14 2002
@@ -501,12 +501,6 @@
 #endif
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
-#define __minor MINOR
-#else
-#define __minor minor
-#endif
-
 static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
 {
         DECLARE_WAITQUEUE(wait, current);
@@ -514,7 +508,7 @@
         struct rfcomm_dlc *dlc;
         int err, id;
 
- id = __minor(tty->device) - tty->driver.minor_start;
+ id = minor(tty->device) - tty->driver.minor_start;
 
         BT_DBG("tty %p id %d", tty, id);
 

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



This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:01:00 EST