switch comx over to initcalls
Subsystems (2)
PATCH 1/1 switch comx over to initcalls
The link order already is the same as the old init order. Note that the drivers are still full of crap, I don't have the hardware so I refuse to poke deeper into the shite..
drivers/net/setup.c +0 -5
@@ -16,7 +16,6 @@extern int fec_enet_init (void );extern int sdla_setup (void );extern int sdla_c_setup (void ); -extern int comx_init (void );extern int lmc_setup (void );extern int madgemc_probe (void );
@@ -52,10 +51,6 @@ #if defined(CONFIG_FEC_ENET) {fec_enet_init, 0}, #endif -#if defined(CONFIG_COMX) - {comx_init, 0}, -#endif - #if defined(CONFIG_LANMEDIA) {lmc_setup, 0}, #endif
===== drivers/net/wan/comx-hw-comx.c 1.10 vs edited =====
drivers/net/wan/comx-hw-comx.c +5 -9
@@ -1427,24 +1427,20 @@NULL }; -#ifdef MODULE -#define comx_hw_comx_init init_module -#endif - -int __init comx_hw_comx_init (void ) +static int __init comx_hw_comx_init (void ) {comx_register_hardware (&comx_hw);comx_register_hardware (&cmx_hw);comx_register_hardware (&hicomx_hw); -memset (memory_used,0 ,sizeof (memory_used));return 0 ; } -#ifdef MODULE -void cleanup_module (void ) +static void __exit comx_hw_comx_exit(void) {comx_unregister_hardware ("comx" );comx_unregister_hardware ("cmx" );comx_unregister_hardware ("hicomx" ); } -#endif + +module_init (comx_hw_comx_init); +module_exit (comx_hw_comx_exit);
===== drivers/net/wan/comx-hw-locomx.c 1.6 vs edited =====
drivers/net/wan/comx-hw-locomx.c +5 -9
@@ -479,20 +479,16 @@NULL }; -#ifdef MODULE -#define comx_hw_locomx_init init_module -#endif - -int __init comx_hw_locomx_init (void ) +static int __init comx_hw_locomx_init (void ) {comx_register_hardware (&locomx_hw);return 0 ; } -#ifdef MODULE -void cleanup_module (void ) +static void __exit comx_hw_locomx_exit(void) {comx_unregister_hardware ("locomx" ); -return ; } -#endif + +module_init (comx_hw_locomx_init); +module_exit (comx_hw_locomx_exit);
===== drivers/net/wan/comx-hw-mixcom.c 1.9 vs edited =====
drivers/net/wan/comx-hw-mixcom.c +6 -12
@@ -944,21 +944,15 @@NULL }; -/* Module management */ - -#ifdef MODULE -#define comx_hw_mixcom_init init_module -#endif - -int __init comx_hw_mixcom_init (void ) +static int __init comx_hw_mixcom_init (void ) { -return (comx_register_hardware (&mixcomhw)); +return comx_register_hardware (&mixcomhw); } -#ifdef MODULE -void -cleanup_module (void ) +static void __exit comx_hw_mixcom_exit(void) {comx_unregister_hardware ("mixcom" ); } -#endif + +module_init (comx_hw_mixcom_init); +module_exit (comx_hw_mixcom_exit);
===== drivers/net/wan/comx-proto-fr.c 1.10 vs edited =====
drivers/net/wan/comx-proto-fr.c +4 -8
@@ -988,11 +988,7 @@ .hw_dump = dlci_dump, }; -#ifdef MODULE -#define comx_proto_fr_init init_module -#endif - -int __init comx_proto_fr_init (void ) +static int __init comx_proto_fr_init (void ) {int ret;
@@ -1005,12 +1001,12 @@return comx_register_protocol (&fr_slave_protocol); } -#ifdef MODULE -void cleanup_module (void ) +static void __exit comx_proto_fr_exit(void) {comx_unregister_hardware (fr_dlci.name);comx_unregister_protocol (fr_master_protocol.name);comx_unregister_protocol (fr_slave_protocol.name); } -#endif /* MODULE */ +module_init (comx_proto_fr_init); +module_exit (comx_proto_fr_exit);
===== drivers/net/wan/comx-proto-lapb.c 1.5 vs edited =====
drivers/net/wan/comx-proto-lapb.c +1 -3
@@ -523,7 +523,7 @@ NULL }; -int __init comx_proto_lapb_init (void ) +static int __init comx_proto_lapb_init (void ) {int ret;
@@ -539,9 +539,7 @@comx_unregister_protocol (comx25_protocol.name); } -#ifdef MODULE module_init (comx_proto_lapb_init); -#endif module_exit (comx_proto_lapb_exit);MODULE_LICENSE ("GPL" );
===== drivers/net/wan/comx-proto-ppp.c 1.4 vs edited =====
drivers/net/wan/comx-proto-ppp.c +10 -12
@@ -247,26 +247,24 @@NULL }; - -#ifdef MODULE -#define comx_proto_ppp_init init_module -#endif - -int __init comx_proto_ppp_init (void ) +static int __init comx_proto_ppp_init (void ) {int ret; -if (0 !=(ret=comx_register_protocol (&hdlc_protocol))) { -return ret; + ret =comx_register_protocol (&hdlc_protocol); +if (!ret) { + ret =comx_register_protocol (&syncppp_protocol); +if (ret) +comx_unregister_protocol (hdlc_protocol.name); } -return comx_register_protocol (&syncppp_protocol); +return ret; } -#ifdef MODULE -void cleanup_module (void ) +static void __exit comx_proto_ppp_exit(void) {comx_unregister_protocol (syncppp_protocol.name);comx_unregister_protocol (hdlc_protocol.name); } -#endif /* MODULE */ +module_init (comx_proto_ppp_init); +module_exit (comx_proto_ppp_exit);
===== drivers/net/wan/comx.c 1.17 vs edited =====
drivers/net/wan/comx.c +5 -42
73 lines not on this page · raw message
David S. Miller
Applied From: Christoph Hellwig <[email protected]>
Date: Sun, 18 May 2003 19:04:24 +0200
The link order already is the same as the old init order. Note that the drivers are still full of crap, I don't have the hardware so I refuse to poke deeper into the shite..
Applied, thanks.