PATCH: linux-2.4.9/drivers/i2o to new module_{init,exit} interface
Subsystems (2)
Quoted 3 lines
Sounds ok to me - Im not against tidying it up. Note btw the -ac i2o code is a little different to vanilla and is the 'current' one. I think your patches will apply fine however as the changes are small
Great. Here is a new patch. I have removed the CONFIG_NET
diff that did not belong, and I added a diff to linux/Makefile to initialize drivers/i2o just before drivers/block, preserving the current initialization order.
Thanks again for processing this patch.
Signature · 4 lines
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104 [email protected] \ / San Jose, California 95129-1034 +1 408 261-6630 | g g d r a s i l United States of America fax +1 408 261-6631 "Free Software For The Rest Of Us."
drivers/block/genhd.c +0 -4
@@ -28,16 +28,12 @@extern void console_map_init (void );extern int soc_probe (void );extern int atmdev_init (void ); -extern int i2o_init (void );extern int cpqarray_init (void );int __init device_init (void ) {blk_dev_init ();sti (); -#ifdef CONFIG_I2O -i2o_init (); -#endif #ifdef CONFIG_BLK_DEV_DAC960 DAC960_Initialize ();#endif
drivers/i2o/i2o_block.c +5 -10
@@ -44,6 +44,7 @@#include <linux/module.h> +#include <linux/init.h> #include <linux/sched.h> #include <linux/fs.h> #include <linux/stat.h>
@@ -1875,10 +1876,6 @@* (Just smiley confuses emacs :-) */ -#ifdef MODULE -#define i2o_block_init init_module -#endif -int i2o_block_init (void ) {int i;
@@ -1895,9 +1892,7 @@ MAJOR_NR);return -EIO ; } -#ifdef MODULE printk (KERN_INFO "i2o_block: registered device at major %d\n" ,MAJOR_NR ); -#endif /* * Now fill in the boiler plate
@@ -1985,13 +1980,11 @@return 0 ; } -#ifdef MODULE -EXPORT_NO_SYMBOLS ;MODULE_AUTHOR ("Red Hat Software" );MODULE_DESCRIPTION ("I2O Block Device OSM" ); -void cleanup_module (void ) +static __exit void i2o_block_exit(void) {struct gendisk *gdp;int i;
@@ -2066,4 +2059,6 @@ } } } -#endif + +module_init (i2o_block_init); +module_exit (i2o_block_exit);
drivers/i2o/i2o_config.c +5 -10
@@ -908,11 +908,7 @@ &config_fops }; -#ifdef MODULE -int init_module(void) -#else int __init i2o_config_init (void ) -#endif {printk (KERN_INFO "I2O configuration manager v 0.04.\n" );printk (KERN_INFO " (C) Copyright 1999 Red Hat Software\n" );
@@ -945,10 +941,9 @@ i2o_cfg_context = cfg_handler.context;return 0 ; } +module_init (i2o_config_init); -#ifdef MODULE - -void cleanup_module (void ) +static __exit void i2o_config_exit(void) {misc_deregister (&i2o_miscdev);
@@ -957,9 +952,9 @@if (i2o_cfg_context !=-1 )i2o_remove_handler (&cfg_handler); } - + +module_exit (i2o_config_exit); +EXPORT_NO_SYMBOLS ;MODULE_AUTHOR ("Red Hat Software" );MODULE_DESCRIPTION ("I2O Configuration" ); - -#endif
drivers/i2o/i2o_core.c +4 -67
102 lines not on this page · raw message
drivers/i2o/i2o_lan.c +5 -9
@@ -1430,11 +1430,7 @@return dev; } -#ifdef MODULE -#define i2o_lan_init init_module -#endif - -int __init i2o_lan_init (void ) +static int __init i2o_lan_init (void ) {struct net_device *dev;int i;
@@ -1515,9 +1511,7 @@return 0 ; } -#ifdef MODULE - -void cleanup_module (void ) +static void __exit i2o_lan_exit(void) {int i;
@@ -1561,6 +1555,9 @@ }EXPORT_NO_SYMBOLS ; +module_init (i2o_lan_init); +module_exit (i2o_lan_exit); +MODULE_AUTHOR ("University of Helsinki, Department of Computer Science" );MODULE_DESCRIPTION ("I2O Lan OSM" );
@@ -1574,4 +1571,3 @@MODULE_PARM (tx_batch_mode,"0-2" "i" );MODULE_PARM_DESC (tx_batch_mode,"0=Send immediatelly, 1=Send in batches, 2=Switch automatically" ); -#endif
drivers/i2o/i2o_pci.c +6 -44
114 lines not on this page · raw message
drivers/i2o/i2o_proc.c +0 -2
@@ -3372,8 +3372,6 @@i2o_remove_handler (&i2o_proc_handler); } -#ifdef MODULE module_init (i2o_proc_init); -#endif module_exit (i2o_proc_exit);
Makefile +6 -3
@@ -130,11 +130,15 @@ DRIVERS-$(CONFIG_ACPI) += drivers/acpi/acpi.o DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o -DRIVERS-y += drivers/char/char.o \ - drivers/block/block.o \ +DRIVERS-y += drivers/char/char.o + +DRIVERS-$(CONFIG_I2O) += drivers/i2o/i2o.o + +DRIVERS-y += drivers/block/block.o \ drivers/misc/misc.o \ drivers/net/net.o \ drivers/media/media.o + DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o DRIVERS-$(CONFIG_DRM) += drivers/char/drm/drm.o DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
@@ -175,7 +183,6 @@ DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o -DRIVERS-$(CONFIG_I2O) += drivers/i2o/i2o.o DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.o