diff options
author | Quentin Lambert <lambert.quentin@gmail.com> | 2015-04-13 10:26:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-17 21:32:07 +0200 |
commit | d681f1166919d6829083c069a83edcd59bfd5e34 (patch) | |
tree | 738cd7f84d0295af0109a040f5e2eed5888ae21e /drivers/ide/sgiioc4.c | |
parent | Merge branch 'akpm' (patches from Andrew) (diff) | |
download | linux-d681f1166919d6829083c069a83edcd59bfd5e34.tar.xz linux-d681f1166919d6829083c069a83edcd59bfd5e34.zip |
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/sgiioc4.c')
-rw-r--r-- | drivers/ide/sgiioc4.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/sgiioc4.c b/drivers/ide/sgiioc4.c index 63761db61384..2d35e9f7516f 100644 --- a/drivers/ide/sgiioc4.c +++ b/drivers/ide/sgiioc4.c @@ -334,8 +334,8 @@ static int ide_dma_sgiioc4(ide_hwif_t *hwif, const struct ide_port_info *d) if (ide_allocate_dma_engine(hwif)) goto dma_pci_alloc_failure; - pad = pci_alloc_consistent(dev, IOC4_IDE_CACHELINE_SIZE, - (dma_addr_t *)&hwif->extra_base); + pad = dma_alloc_coherent(&dev->dev, IOC4_IDE_CACHELINE_SIZE, + (dma_addr_t *)&hwif->extra_base, GFP_KERNEL); if (pad) { ide_set_hwifdata(hwif, pad); return 0; |