linux/drivers/media/pci
Christophe JAILLET f79469016e media: b2c2: switch from 'pci_' to 'dma_' API
The wrappers in include/linux/pci-dma-compat.h should go away.

The patch has been generated with the coccinelle script below and has been
hand modified to replace GFP_ with a correct flag.
It has been compile tested.

When memory is allocated in 'flexcop_dma_allocate()', GFP_KERNEL can be
used because it is only called from the probe function (i.e.
'flexcop_pci_probe()') and no lock is taken.

The call chain is:
   flexcop_pci_probe
      --> flexcop_pci_dma_init
         --> flexcop_dma_allocate

@@
@@
-    PCI_DMA_BIDIRECTIONAL
+    DMA_BIDIRECTIONAL

@@
@@
-    PCI_DMA_TODEVICE
+    DMA_TO_DEVICE

@@
@@
-    PCI_DMA_FROMDEVICE
+    DMA_FROM_DEVICE

@@
@@
-    PCI_DMA_NONE
+    DMA_NONE

@@
expression e1, e2, e3;
@@
-    pci_alloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3;
@@
-    pci_zalloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3, e4;
@@
-    pci_free_consistent(e1, e2, e3, e4)
+    dma_free_coherent(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_single(e1, e2, e3, e4)
+    dma_map_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_single(e1, e2, e3, e4)
+    dma_unmap_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4, e5;
@@
-    pci_map_page(e1, e2, e3, e4, e5)
+    dma_map_page(&e1->dev, e2, e3, e4, e5)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_page(e1, e2, e3, e4)
+    dma_unmap_page(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_sg(e1, e2, e3, e4)
+    dma_map_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_sg(e1, e2, e3, e4)
+    dma_unmap_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
+    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_device(e1, e2, e3, e4)
+    dma_sync_single_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
+    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
+    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2;
@@
-    pci_dma_mapping_error(e1, e2)
+    dma_mapping_error(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_dma_mask(e1, e2)
+    dma_set_mask(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_consistent_dma_mask(e1, e2)
+    dma_set_coherent_mask(&e1->dev, e2)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-11-27 14:07:50 +01:00
..
b2c2 media: b2c2: switch from 'pci_' to 'dma_' API 2020-11-27 14:07:50 +01:00
bt8xx media: media/pci: simplify the return expression of verify_window_lock 2020-11-16 10:31:15 +01:00
cobalt media: pci: cobalt-i2c.c: fix comparison of 0/1 to bool variable 2020-08-29 08:04:01 +02:00
cx18 media: cx18: Replace http links with https ones 2020-07-19 14:00:32 +02:00
cx88 media: pci: fix common ALSA DMA-mapping related codes 2020-09-26 10:34:44 +02:00
cx23885 media: Bulk remove BUG_ON(in_interrupt()) 2020-11-16 10:31:10 +01:00
cx25821 media: Bulk remove BUG_ON(in_interrupt()) 2020-11-16 10:31:10 +01:00
ddbridge treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dm1105 media: delete unused proc_fs.h include 2019-10-07 07:31:36 -03:00
dt3155 media: media/pci: use vb2_video_unregister_device() 2020-08-28 15:01:54 +02:00
intel media: ipu3-cio2: fix trivial style warning 2020-11-25 14:42:06 +01:00
ivtv media updates for v5.9-rc1 2020-08-07 13:00:53 -07:00
mantis media: mantis: remove redundant assignment to variable err 2020-11-27 11:12:27 +01:00
meye treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
netup_unidvb media: netup_unidvb: drop initialization of PM pointers 2020-09-27 11:24:28 +02:00
ngene media: ngene: convert tasklets to use new tasklet_setup() API 2020-08-29 08:11:47 +02:00
pluto2 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
pt1 media: pci: Use dev_get_drvdata where possible 2019-07-25 06:45:10 -04:00
pt3 media: pci: Use dev_get_drvdata where possible 2019-07-25 06:45:10 -04:00
saa7134 media: saa7134: improve f->fmt.win.clips NULL check 2020-11-17 07:13:27 +01:00
saa7146 media: media/pci: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:50 +01:00
saa7164 media: saa7164: convert to use DEFINE_SEQ_ATTRIBUTE macro 2020-11-16 10:31:09 +01:00
smipcie media: rc: harmonize infrared durations to microseconds 2020-09-03 16:18:55 +02:00
solo6x10 media: solo6x10: fix missing snd_card_free in error handling case 2020-11-17 07:13:45 +01:00
sta2x11 media: media/pci: use vb2_video_unregister_device() 2020-08-28 15:01:54 +02:00
ttpci media: av7110: don't do float point math 2020-09-12 09:39:37 +02:00
tw68 media: tw68: use generic power management 2020-07-19 14:24:57 +02:00
tw686x media: media/pci: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:50 +01:00
tw5864 media: tw5864: check status of tw5864_frameinterval_get 2020-08-29 08:16:16 +02:00
Kconfig Revert "media: Kconfig: better support hybrid TV devices" 2020-04-14 11:00:30 +02:00
Makefile