|
From: Fredrik S. <fre...@us...> - 2002-02-12 13:54:02
|
The following files were modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bluetooth.c 1.222 1.223=20=20=20=20=20=20=20=20=20=20=20
bnep.c 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Patch from Fabrizio Gennari <fab...@ph...>: Fix compiler er=
rors when building the stack as a module.
The diff of the modified file(s):
--- bluetooth.c 6 Feb 2002 11:23:13 -0000 1.222
+++ bluetooth.c 12 Feb 2002 13:54:00 -0000 1.223
@@ -2556,6 +2556,9 @@
=20
hci_module_init();
rfcomm_module_init();
+#ifdef CONFIG_BLUETOOTH_PAN
+ bnep_init_module();
+#endif
=20=20=20=20=20=20=20=20=20
return 0; /* success */
}
@@ -3269,6 +3272,10 @@
bnep_status_remove_proc_file();
#endif
#endif /* CONFIG_BLUETOOTH_PROC */
+
+#ifdef CONFIG_BLUETOOTH_PAN
+ bnep_exit_module();
+#endif
=20
DSYS("Bluetooth Driver unregistered\n");
}
--- bnep.c 12 Feb 2002 11:02:21 -0000 1.5
+++ bnep.c 12 Feb 2002 13:54:00 -0000 1.6
@@ -128,8 +128,6 @@
=20
/****************** LOCAL FUNCTION DECLARATION SECTION *******************=
***/
=20
-static int bnep_init_module(void);
-
/* Ethernet interface */
static int __init bnep_init_interface(struct net_device *dev);
static int bnep_close(struct net_device *dev);
@@ -153,13 +151,10 @@
=20
/****************** FUNCTION DEFINITION SECTION **************************=
***/
=20
-/* Tell the kernel to call my init routine. */
-module_init(bnep_init_module);
-
/*=20
* Init routine for the BNEP driver.=20
*/
-static int
+int
bnep_init_module(void)
{
int i, err;
@@ -183,6 +178,20 @@
}
}
return 0;
+}
+
+void
+bnep_exit_module(void)
+{
+ int i;
+ struct net_device *d;
+
+ for (i =3D 0; i < BNEP_INTERFACES; i++) {
+ d =3D &dev_bnep[i];
+
+ D_MISC("Unregister netdev %s\n", d->name);
+ unregister_netdev(d);
+ }
}
=20
/*=20
|