]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/ips.c
backlight/leds: Make two structs static
[linux-2.6-omap-h63xx.git] / drivers / scsi / ips.c
index f9fce70f396af6e489d9ae0d15968dddbf2064ca..492a51bd6aa899bb8d64a5cf60ab304913d8d7c2 100644 (file)
@@ -6987,7 +6987,6 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
        uint32_t mem_addr;
        uint32_t io_len;
        uint32_t mem_len;
-       uint8_t revision_id;
        uint8_t bus;
        uint8_t func;
        uint8_t irq;
@@ -7066,23 +7065,16 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
                }
        }
 
-       /* get the revision ID */
-       if (pci_read_config_byte(pci_dev, PCI_REVISION_ID, &revision_id)) {
-               IPS_PRINTK(KERN_WARNING, pci_dev, "Can't get revision id.\n");
-               return -1;
-       }
-
        subdevice_id = pci_dev->subsystem_device;
 
        /* found a controller */
-       ha = kmalloc(sizeof (ips_ha_t), GFP_KERNEL);
+       ha = kzalloc(sizeof (ips_ha_t), GFP_KERNEL);
        if (ha == NULL) {
                IPS_PRINTK(KERN_WARNING, pci_dev,
                           "Unable to allocate temporary ha struct\n");
                return -1;
        }
 
-       memset(ha, 0, sizeof (ips_ha_t));
 
        ips_sh[index] = NULL;
        ips_ha[index] = ha;
@@ -7097,7 +7089,7 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
        ha->mem_ptr = mem_ptr;
        ha->ioremap_ptr = ioremap_ptr;
        ha->host_num = (uint32_t) index;
-       ha->revision_id = revision_id;
+       ha->revision_id = pci_dev->revision;
        ha->slot_num = PCI_SLOT(pci_dev->devfn);
        ha->device_id = pci_dev->device;
        ha->subdevice_id = subdevice_id;