Commit a7ec87a9 authored by Romain Perier's avatar Romain Perier Committed by Martin K. Petersen

scsi: pmcraid: Replace PCI pool old API

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: default avatarRomain Perier <romain.perier@collabora.com>
Acked-by: default avatarPeter Senna Tschudin <peter.senna@collabora.com>
Tested-by: default avatarPeter Senna Tschudin <peter.senna@collabora.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4dbd6712
...@@ -4655,13 +4655,13 @@ pmcraid_release_control_blocks( ...@@ -4655,13 +4655,13 @@ pmcraid_release_control_blocks(
return; return;
for (i = 0; i < max_index; i++) { 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,
pinstance->cmd_list[i]->ioa_cb_bus_addr); pinstance->cmd_list[i]->ioa_cb_bus_addr);
pinstance->cmd_list[i]->ioa_cb = NULL; pinstance->cmd_list[i]->ioa_cb = NULL;
pinstance->cmd_list[i]->ioa_cb_bus_addr = 0; 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; pinstance->control_pool = NULL;
} }
...@@ -4718,8 +4718,8 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance) ...@@ -4718,8 +4718,8 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance)
pinstance->host->unique_id); pinstance->host->unique_id);
pinstance->control_pool = pinstance->control_pool =
pci_pool_create(pinstance->ctl_pool_name, dma_pool_create(pinstance->ctl_pool_name,
pinstance->pdev, &pinstance->pdev->dev,
sizeof(struct pmcraid_control_block), sizeof(struct pmcraid_control_block),
PMCRAID_IOARCB_ALIGNMENT, 0); PMCRAID_IOARCB_ALIGNMENT, 0);
...@@ -4728,7 +4728,7 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance) ...@@ -4728,7 +4728,7 @@ static int pmcraid_allocate_control_blocks(struct pmcraid_instance *pinstance)
for (i = 0; i < PMCRAID_MAX_CMD; i++) { for (i = 0; i < PMCRAID_MAX_CMD; i++) {
pinstance->cmd_list[i]->ioa_cb = pinstance->cmd_list[i]->ioa_cb =
pci_pool_alloc( dma_pool_alloc(
pinstance->control_pool, pinstance->control_pool,
GFP_KERNEL, GFP_KERNEL,
&(pinstance->cmd_list[i]->ioa_cb_bus_addr)); &(pinstance->cmd_list[i]->ioa_cb_bus_addr));
......
...@@ -755,7 +755,7 @@ struct pmcraid_instance { ...@@ -755,7 +755,7 @@ struct pmcraid_instance {
/* structures related to command blocks */ /* structures related to command blocks */
struct kmem_cache *cmd_cachep; /* cache for cmd 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 cmd_pool_name[64]; /* name of cmd cache */
char ctl_pool_name[64]; /* name of control cache */ char ctl_pool_name[64]; /* name of control cache */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment