]> err.no Git - linux-2.6/blobdiff - drivers/dma/ioat.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
[linux-2.6] / drivers / dma / ioat.c
index 54fdeb7c4945cd28b4cb1892ef4b4b1b7cd527be..f204c39fb412e2c25469ffbe41dc7e483d65096d 100644 (file)
@@ -34,7 +34,7 @@
 #include "ioatdma_registers.h"
 #include "ioatdma_hw.h"
 
-MODULE_VERSION("1.24");
+MODULE_VERSION(IOAT_DMA_VERSION);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Intel Corporation");
 
@@ -71,7 +71,7 @@ static int ioat_setup_functionality(struct pci_dev *pdev, void __iomem *iobase)
        switch (version) {
        case IOAT_VER_1_2:
                device->dma = ioat_dma_probe(pdev, iobase);
-               if (ioat_dca_enabled)
+               if (device->dma && ioat_dca_enabled)
                        device->dca = ioat_dca_init(pdev, iobase);
                break;
        default:
@@ -85,17 +85,17 @@ static void ioat_shutdown_functionality(struct pci_dev *pdev)
 {
        struct ioat_device *device = pci_get_drvdata(pdev);
 
-       if (device->dma) {
-               ioat_dma_remove(device->dma);
-               device->dma = NULL;
-       }
-
+       dev_err(&pdev->dev, "Removing dma and dca services\n");
        if (device->dca) {
                unregister_dca_provider(device->dca);
                free_dca_provider(device->dca);
                device->dca = NULL;
        }
 
+       if (device->dma) {
+               ioat_dma_remove(device->dma);
+               device->dma = NULL;
+       }
 }
 
 static struct pci_driver ioat_pci_driver = {