]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/pci/hpt366.c
Auto-update from upstream
[linux-2.6-omap-h63xx.git] / drivers / ide / pci / hpt366.c
index 7b64db10d1b03cd82786cbb8ca34852c7df6e518..7b589d948bf98bce6405196a55444787d4eff920 100644 (file)
@@ -1334,9 +1334,13 @@ static int __devinit init_hpt366(struct pci_dev *dev)
 static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const char *name)
 {
        int ret = 0;
-       /* FIXME: Not portable */
+
+       /*
+        * FIXME: Not portable. Also, why do we enable the ROM in the first place?
+        * We don't seem to be using it.
+        */
        if (dev->resource[PCI_ROM_RESOURCE].start)
-               pci_write_config_byte(dev, PCI_ROM_ADDRESS,
+               pci_write_config_dword(dev, PCI_ROM_ADDRESS,
                        dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
 
        pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4));
@@ -1512,7 +1516,7 @@ static void __devinit init_dma_hpt366(ide_hwif_t *hwif, unsigned long dmabase)
 
 static void __devinit init_iops_hpt366(ide_hwif_t *hwif)
 {
-       struct hpt_info *info = kmalloc(sizeof(struct hpt_info), GFP_KERNEL);
+       struct hpt_info *info = kzalloc(sizeof(struct hpt_info), GFP_KERNEL);
        unsigned long dmabase = pci_resource_start(hwif->pci_dev, 4);
        u8 did, rid;
 
@@ -1520,7 +1524,6 @@ static void __devinit init_iops_hpt366(ide_hwif_t *hwif)
                printk(KERN_WARNING "hpt366: out of memory.\n");
                return;
        }
-       memset(info, 0, sizeof(struct hpt_info));
        ide_set_hwifdata(hwif, info);
 
        if(dmabase) {