This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / scsi / sata_sx4.c
index 20a0125..9c8e5cc 100644 (file)
@@ -40,7 +40,7 @@
 #include "sata_promise.h"
 
 #define DRV_NAME       "sata_sx4"
-#define DRV_VERSION    "0.7"
+#define DRV_VERSION    "0.50"
 
 
 enum {
@@ -248,7 +248,7 @@ static void pdc20621_host_stop(struct ata_host_set *host_set)
 
 static int pdc_port_start(struct ata_port *ap)
 {
-       struct device *dev = ap->host_set->dev;
+       struct pci_dev *pdev = ap->host_set->pdev;
        struct pdc_port_priv *pp;
        int rc;
 
@@ -263,7 +263,7 @@ static int pdc_port_start(struct ata_port *ap)
        }
        memset(pp, 0, sizeof(*pp));
 
-       pp->pkt = dma_alloc_coherent(dev, 128, &pp->pkt_dma, GFP_KERNEL);
+       pp->pkt = pci_alloc_consistent(pdev, 128, &pp->pkt_dma);
        if (!pp->pkt) {
                rc = -ENOMEM;
                goto err_out_kfree;
@@ -283,11 +283,11 @@ err_out:
 
 static void pdc_port_stop(struct ata_port *ap)
 {
-       struct device *dev = ap->host_set->dev;
+       struct pci_dev *pdev = ap->host_set->pdev;
        struct pdc_port_priv *pp = ap->private_data;
 
        ap->private_data = NULL;
-       dma_free_coherent(dev, 128, pp->pkt, pp->pkt_dma);
+       pci_free_consistent(pdev, 128, pp->pkt, pp->pkt_dma);
        kfree(pp);
        ata_port_stop(ap);
 }
@@ -1397,7 +1397,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *
        }
 
        memset(probe_ent, 0, sizeof(*probe_ent));
-       probe_ent->dev = pci_dev_to_dev(pdev);
+       probe_ent->pdev = pdev;
        INIT_LIST_HEAD(&probe_ent->node);
 
        mmio_base = ioremap(pci_resource_start(pdev, 3),