scsi: pmcraid: Replace PCI pool old API
authorRomain Perier <romain.perier@collabora.com>
Thu, 6 Jul 2017 08:13:09 +0000 (10:13 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 7 Aug 2017 18:04:01 +0000 (14:04 -0400)
The PCI pool API is deprecated. This commit replaces the PCI pool old
API by the appropriate function with the DMA pool API.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
Acked-by: Peter Senna Tschudin <peter.senna@collabora.com>
Tested-by: Peter Senna Tschudin <peter.senna@collabora.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pmcraid.c
drivers/scsi/pmcraid.h

index 1cc814f1505a3c149133a0c8c5c2f5f556c056d4..1f8b1533d0c4dda406dae5fb52acecd3064f44fb 100644 (file)
@@ -4655,13 +4655,13 @@ pmcraid_release_control_blocks(
                return;
 
        for (i = 0; i < max_index; i++) {
-               pci_pool_free(pinstance->control_pool,
+               dma_pool_free(pinstance->control_pool,
                              pinstance->cmd_list[i]->ioa_cb,
                              pinstance->cmd_list[i]->ioa_cb_bus_addr);
                pinstance->cmd_list[i]->ioa_cb = NULL;
                pinstance->cmd_list[i]->ioa_cb_bus_addr = 0;
        }
-       pci_pool_destroy(pinstance->control_pool);
+       dma_pool_destroy(pinstance->control_pool);
        pinstance->control_pool = NULL;
 }
 
@@ -4718,8 +4718,8 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance)
                pinstance->host->unique_id);
 
        pinstance->control_pool =
-               pci_pool_create(pinstance->ctl_pool_name,
-                               pinstance->pdev,
+               dma_pool_create(pinstance->ctl_pool_name,
+                               &pinstance->pdev->dev,
                                sizeof(struct pmcraid_control_block),
                                PMCRAID_IOARCB_ALIGNMENT, 0);
 
@@ -4728,7 +4728,7 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance)
 
        for (i = 0; i < PMCRAID_MAX_CMD; i++) {
                pinstance->cmd_list[i]->ioa_cb =
-                       pci_pool_alloc(
+                       dma_pool_alloc(
                                pinstance->control_pool,
                                GFP_KERNEL,
                                &(pinstance->cmd_list[i]->ioa_cb_bus_addr));
index 01eb2bc16dc1daf9fe4392768bbf421e0f760115..8bfac72a242b77a22c2a2e1947ec33558345415e 100644 (file)
@@ -755,7 +755,7 @@ struct pmcraid_instance {
 
        /* structures related to command blocks */
        struct kmem_cache *cmd_cachep;          /* cache for cmd blocks */
-       struct pci_pool *control_pool;          /* pool for control blocks */
+       struct dma_pool *control_pool;          /* pool for control blocks */
        char   cmd_pool_name[64];               /* name of cmd cache */
        char   ctl_pool_name[64];               /* name of control cache */