vserver 1.9.3
[linux-2.6.git] / drivers / ide / pci / hpt366.c
index 5f5bc3b..d1e8adb 100644 (file)
@@ -777,9 +777,6 @@ static int hpt3xx_tristate (ide_drive_t * drive, int state)
        u8 reg59h = 0, reset    = (hwif->channel) ? 0x80 : 0x40;
        u8 regXXh = 0, state_reg= (hwif->channel) ? 0x57 : 0x53;
 
-       if (!hwif)
-               return -EINVAL;
-
 //     hwif->bus_state = state;
 
        pci_read_config_byte(dev, 0x59, &reg59h);
@@ -813,9 +810,6 @@ static int hpt370_busproc(ide_drive_t * drive, int state)
        u8 tristate = 0, resetmask = 0, bus_reg = 0;
        u16 tri_reg;
 
-       if (!hwif)
-               return -EINVAL;
-
        hwif->bus_state = state;
 
        if (hwif->channel) { 
@@ -958,7 +952,7 @@ static int __devinit init_hpt37x(struct pci_dev *dev)
                        /* Unsupported */
                } else if (pll == F_LOW_PCI_50) {
                        if (hpt_minimum_revision(dev,8))
-                               pci_set_drvdata(dev, NULL);
+                               pci_set_drvdata(dev, (void *) fifty_base_hpt370a);
                        else if (hpt_minimum_revision(dev,5))
                                pci_set_drvdata(dev, (void *) fifty_base_hpt372);
                        else if (hpt_minimum_revision(dev,4))
@@ -991,11 +985,6 @@ static int __devinit init_hpt37x(struct pci_dev *dev)
        if (pci_get_drvdata(dev)) 
                goto init_hpt37X_done;
        
-       if (hpt_minimum_revision(dev,8))
-       {
-               printk(KERN_ERR "HPT374: Only 33MHz PCI timings are supported.\n");
-               return -EOPNOTSUPP;
-       }
        /*
         * adjust PLL based upon PCI clock, enable it, and wait for
         * stabilization.
@@ -1403,7 +1392,7 @@ static struct pci_device_id hpt366_pci_tbl[] = {
 MODULE_DEVICE_TABLE(pci, hpt366_pci_tbl);
 
 static struct pci_driver driver = {
-       .name           = "HPT366 IDE",
+       .name           = "HPT366_IDE",
        .id_table       = hpt366_pci_tbl,
        .probe          = hpt366_init_one,
 };