Amitoj Kaur Chawla d2b0fc6e29 staging: comedi: drivers: Remove use of deprecated pci API
Replace pci_[alloc|free]_consistent occurences with
dma_[alloc|free]_coherent.

The Coccinelle semantic patch that was used to make some of these
changes is as follows:
@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_KERNEL
  )
|
- pci_alloc_consistent@p ( id,
+ dma_alloc_coherent ( &id->dev,
...
+ , GFP_KERNEL
  )
)

alloc_and_init_dma_members does not affect the interrupt status and is
only called by auto_attach, which also does not affect the interrupt
status. auto_attach() also contains a call to comedi_alloc_devpriv()
which calls kzalloc with GFP_KERNEL flag.  Thus, there seems to be no
danger that dma_alloc_coherent can be called with interrupts turned
off, and GFP_KERNEL can be used.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-05 14:56:55 -08:00
..
2016-02-27 12:33:42 -08:00
2016-03-01 16:10:45 -08:00
2016-02-10 11:35:55 -05:00
2015-12-29 15:32:24 -05:00
2016-02-14 14:25:59 -08:00
2016-02-01 12:27:18 -08:00
2016-03-01 16:10:45 -08:00
2016-01-01 18:31:34 +01:00
2015-12-21 11:44:00 +09:00
2016-01-20 17:30:20 -08:00
2016-02-16 08:04:06 -08:00
2016-01-12 12:17:28 +01:00
2016-01-20 18:42:30 -08:00
2016-02-23 17:17:20 -08:00
2016-02-12 08:10:31 -07:00
2016-02-14 14:25:59 -08:00
2016-02-17 11:50:53 -08:00
2016-01-22 18:04:28 -05:00
2016-01-20 17:09:18 -08:00
2016-01-03 16:32:59 -08:00
2016-02-27 12:33:42 -08:00
2016-01-12 01:12:40 +01:00
2016-01-20 17:09:18 -08:00
2016-01-15 12:14:47 -08:00
2015-12-12 08:53:21 +01:00
2016-01-18 12:10:45 -08:00
2016-02-17 09:24:07 +01:00
2016-02-18 16:24:48 -08:00
2016-02-24 09:04:21 -08:00
2015-12-01 14:26:33 -08:00
2016-02-07 23:17:59 -08:00
2016-02-22 13:57:01 -08:00