[PATCH 2/11] drivers/watchdog: Eliminate a NULL pointer dereference
[safe/jmp/linux-2.6] / drivers / ata / pata_sl82c105.c
index bee11ca..98548f6 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * pata_sl82c105.c     - SL82C105 PATA for new ATA layer
  *                       (C) 2005 Red Hat Inc
- *                       Alan Cox <alan@redhat.com>
  *
  * Based in part on linux/drivers/ide/pci/sl82c105.c
  *             SL82C105/Winbond 553 IDE driver
@@ -60,7 +59,7 @@ static int sl82c105_pre_reset(struct ata_link *link, unsigned long deadline)
 
        if (ap->port_no && !pci_test_config_bits(pdev, &sl82c105_enable_bits[ap->port_no]))
                return -ENOENT;
-       return ata_std_prereset(link, deadline);
+       return ata_sff_prereset(link, deadline);
 }
 
 
@@ -216,7 +215,7 @@ static int sl82c105_qc_defer(struct ata_queued_cmd *qc)
        struct ata_port *alt = host->ports[1 ^ qc->ap->port_no];
        int rc;
 
-       /* First apply the usual rules */       
+       /* First apply the usual rules */
        rc = ata_std_qc_defer(qc);
        if (rc != 0)
                return rc;
@@ -284,13 +283,13 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id
 {
        static const struct ata_port_info info_dma = {
                .flags = ATA_FLAG_SLAVE_POSS,
-               .pio_mask = 0x1f,
-               .mwdma_mask = 0x07,
+               .pio_mask = ATA_PIO4,
+               .mwdma_mask = ATA_MWDMA2,
                .port_ops = &sl82c105_port_ops
        };
        static const struct ata_port_info info_early = {
                .flags = ATA_FLAG_SLAVE_POSS,
-               .pio_mask = 0x1f,
+               .pio_mask = ATA_PIO4,
                .port_ops = &sl82c105_port_ops
        };
        /* for now use only the first port */
@@ -317,7 +316,7 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id
        val |= CTRL_P0EN | CTRL_P0F16 | CTRL_P1F16;
        pci_write_config_dword(dev, 0x40, val);
 
-       return ata_pci_init_one(dev, ppi, &sl82c105_sht, NULL);
+       return ata_pci_bmdma_init_one(dev, ppi, &sl82c105_sht, NULL, 0);
 }
 
 static const struct pci_device_id sl82c105[] = {