PATCH: linux-2.4.9/drivers/block/DAC960.c to new module_{init,exit} interface
Quoted 1 line
I don't see any patch present as part of this message...
Oops! Sorry. Here is the 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/DAC960.c +7 -19
@@ -41,6 +41,7 @@#include <linux/spinlock.h> #include <linux/timer.h> #include <linux/pci.h> +#include <linux/init.h> #include <asm/io.h> #include <asm/segment.h> #include <asm/uaccess.h>
@@ -2534,7 +2535,7 @@DAC960_Initialize initializes the DAC960 Driver. */ -void DAC960_Initialize (void ) +static int __init DAC960_Initialize (void ) {int ControllerNumber;DAC960_DetectControllers (DAC960_BA_Controller);
@@ -2543,7 +2544,7 @@DAC960_DetectControllers (DAC960_PG_Controller);DAC960_DetectControllers (DAC960_PD_Controller);DAC960_SortControllers (); -if (DAC960_ActiveControllerCount ==0 )return ; +if (DAC960_ActiveControllerCount ==0 )return -ENODEV ;for (ControllerNumber =0 ; ControllerNumber < DAC960_ControllerCount; ControllerNumber++)
@@ -2559,6 +2560,7 @@ }DAC960_CreateProcEntries ();register_reboot_notifier (&DAC960_NotifierBlock); +return (DAC960_ActiveControllerCount >0 ?0 : -ENODEV ); }
@@ -6609,24 +6611,10 @@ } -/* -Include Module support if requested. -*/ - -#ifdef MODULE - - -int init_module (void ) -{ -DAC960_Initialize (); -return (DAC960_ActiveControllerCount >0 ?0 :-1 ); -} - - -void cleanup_module (void ) +void __exit DAC960_Exit(void) {DAC960_Finalize (&DAC960_NotifierBlock,SYS_RESTART ,NULL ); } - -#endif +module_init (DAC960_Initialize); +module_exit (DAC960_Exit);
drivers/block/genhd.c +0 -6
@@ -18,9 +18,6 @@#include <linux/init.h> extern int blk_dev_init (void ); -#ifdef CONFIG_BLK_DEV_DAC960 -extern void DAC960_Initialize (void ); -#endif #ifdef CONFIG_FUSION_BOOT extern int fusion_init (void );#endif
@@ -37,9 +34,6 @@sti ();#ifdef CONFIG_I2O i2o_init (); -#endif -#ifdef CONFIG_BLK_DEV_DAC960 -DAC960_Initialize ();#endif #ifdef CONFIG_FUSION_BOOT fusion_init ();