summaryrefslogtreecommitdiff
path: root/drivers/ide/pmac.c
diff options
context:
space:
mode:
authorQuentin Lambert <lambert.quentin@gmail.com>2015-04-13 10:26:53 +0200
committerDavid S. Miller <davem@davemloft.net>2015-04-17 15:32:07 -0400
commitd681f1166919d6829083c069a83edcd59bfd5e34 (patch)
tree738cd7f84d0295af0109a040f5e2eed5888ae21e /drivers/ide/pmac.c
parent54e514b91b95d6441c12a7955addfb9f9d2afc65 (diff)
ide: remove deprecated use of pci api
Replace occurences of the pci api by appropriate call to the dma api. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @deprecated@ idexpression id; position p; @@ ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @bad1@ idexpression id; position deprecated.p; @@ ...when != &id->dev when != pci_get_drvdata ( id ) when != pci_enable_device ( id ) ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @depends on !bad1@ idexpression id; expression direction; position deprecated.p; @@ ( - pci_dma_supported@p ( id, + dma_supported ( &id->dev, ... + , GFP_ATOMIC ) | - pci_alloc_consistent@p ( id, + dma_alloc_coherent ( &id->dev, ... + , GFP_ATOMIC ) ) Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ide/pmac.c')
-rw-r--r--drivers/ide/pmac.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c
index d24a3f8b49bc..96a345248224 100644
--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -1689,10 +1689,9 @@ static int pmac_ide_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d)
* The +2 is +1 for the stop command and +1 to allow for
* aligning the start address to a multiple of 16 bytes.
*/
- pmif->dma_table_cpu = pci_alloc_consistent(
- dev,
+ pmif->dma_table_cpu = dma_alloc_coherent(&dev->dev,
(MAX_DCMDS + 2) * sizeof(struct dbdma_cmd),
- &hwif->dmatable_dma);
+ &hwif->dmatable_dma, GFP_KERNEL);
if (pmif->dma_table_cpu == NULL) {
printk(KERN_ERR "%s: unable to allocate DMA command list\n",
hwif->name);