]> git.hungrycats.org Git - linux/commitdiff
[SCSI]: Fix bugs in sym2 hotplug conversion.
authorDavid S. Miller <davem@nuts.ninka.net>
Sun, 17 Aug 2003 19:39:35 +0000 (12:39 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Sun, 17 Aug 2003 19:39:35 +0000 (12:39 -0700)
1) Make sym2_template.module get setup properly.  It was
   the scsi_module.c code taking care of this for us previously.
2) Zero out on-stack structures, in particular sym_dev not being
   zeroed out was causing sometimes-boots-sometimes-doesnt problems
   for me on sparc64 with sym2 non-modular.

drivers/scsi/sym53c8xx_2/sym_glue.c

index 7498d20f8c28870046896523b6f099e8b0f95303..d75a11fa5e83a93eb39f4c15e0ad05ba3744bbb6 100644 (file)
@@ -2732,6 +2732,7 @@ MODULE_LICENSE("Dual BSD/GPL");
  * Driver host template.
  */
 static struct scsi_host_template sym2_template = {
+       .module                 = THIS_MODULE,
        .name                   = "sym53c8xx",
 #if 0
        .detect                 = sym53c8xx_detect,
@@ -2832,6 +2833,9 @@ static int __devinit sym2_probe(struct pci_dev *pdev,
        sym_device sym_dev;
        sym_nvram nvram;
 
+       memset(&sym_dev, 0, sizeof(sym_dev));
+       memset(&nvram, 0, sizeof(nvram));
+
        sym_dev.host_id = SYM_SETUP_HOST_ID;
        if (sym53c8xx_pci_init(pdev, &sym_dev))
                return -ENODEV;