diff -ur --exclude-from=/root/torben linux-2.4.0-test9p2/drivers/scsi/hosts.c linux/drivers/scsi/hosts.c --- linux-2.4.0-test9p2/drivers/scsi/hosts.c Tue Jul 11 20:17:45 2000 +++ linux/drivers/scsi/hosts.c Sun Sep 17 21:28:35 2000 @@ -11,6 +11,10 @@ * Jiffies wrap fixes (host->resetting), 3 Dec 1998 Andrea Arcangeli * Added QLOGIC QLA1280 SCSI controller kernel host support. * August 4, 1999 Fred Lewis, Intel DuPont + * + * Updated to reflect the new initialization scheme for the higher + * level of scsi drivers (sd/sr/st) + * September 17, 2000 Torben Mathiasen */ @@ -998,20 +1002,7 @@ printk ("scsi : %d host%s.\n", next_scsi_host, (next_scsi_host == 1) ? "" : "s"); - /* Now attach the high level drivers */ -#ifdef CONFIG_BLK_DEV_SD - scsi_register_device(&sd_template); -#endif -#ifdef CONFIG_BLK_DEV_SR - scsi_register_device(&sr_template); -#endif -#ifdef CONFIG_CHR_DEV_ST - scsi_register_device(&st_template); -#endif -#ifdef CONFIG_CHR_DEV_SG - scsi_register_device(&sg_template); -#endif - + #if 0 max_scsi_hosts = next_scsi_host; #endif diff -ur --exclude-from=/root/torben linux-2.4.0-test9p2/drivers/scsi/sd.c linux/drivers/scsi/sd.c --- linux-2.4.0-test9p2/drivers/scsi/sd.c Sun Sep 17 21:23:48 2000 +++ linux/drivers/scsi/sd.c Sun Sep 17 21:26:46 2000 @@ -1335,13 +1335,13 @@ return; } -static int init_sd(void) +static int __init init_sd(void) { sd_template.module = THIS_MODULE; return scsi_register_module(MODULE_SCSI_DEV, &sd_template); } -static void exit_sd(void) +static void __exit exit_sd(void) { struct gendisk **prev_sdgd_link; struct gendisk *sdgd; diff -ur --exclude-from=/root/torben linux-2.4.0-test9p2/drivers/scsi/st.c linux/drivers/scsi/st.c --- linux-2.4.0-test9p2/drivers/scsi/st.c Wed Sep 6 21:53:14 2000 +++ linux/drivers/scsi/st.c Sun Sep 17 21:27:12 2000 @@ -3700,9 +3700,7 @@ } -#ifdef MODULE - -int __init init_module(void) +static int __init init_st(void) { validate_options(); @@ -3710,7 +3708,7 @@ return scsi_register_module(MODULE_SCSI_DEV, &st_template); } -void cleanup_module(void) +static void __exit exit_st(void) { int i; @@ -3736,4 +3734,6 @@ st_template.dev_max = 0; printk(KERN_INFO "st: Unloaded.\n"); } -#endif /* MODULE */ + +module_init(init_st); +module_exit(exit_st);