linux/drivers/media/pci
Christophe JAILLET bb5d418076 media: cx25821: 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 'cx25821_riscmem_alloc()' GFP_KERNEL can be
used because either this flag is already used in the call chain, or it is
called from a 'buf_prepare' function.

The call chains are:
  vb2_ops.buf_prepare              (in cx25821-video.c)
    cx25821_buffer_prepare         (in cx25821-video.c)
      cx25821_risc_buffer
        cx25821_riscmem_alloc

  snd_cx25821_hw_params            (in cx25821-alsa.c) <-- use GFP_KERNEL
    cx25821_risc_databuffer_audio
      cx25821_riscmem_alloc

@@
@@
-    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: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-03-22 13:06:59 +01:00
..
b2c2 media: b2c2: switch from 'pci_' to 'dma_' API 2020-11-27 14:07:50 +01:00
bt8xx media: bttv: use generic power management 2020-11-27 14:11:26 +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: drivers: media: pci: cx18: Spelling fix of minimze to minimize in the file cx18-av-audio.c 2021-03-11 11:59:42 +01:00
cx88 media: cx88: use ARRAY_SIZE 2020-12-03 07:37:07 +01:00
cx23885 media: cx23885: Fix various Hauppauge device analog capture inputs 2021-03-11 11:59:45 +01:00
cx25821 media: cx25821: switch from 'pci_' to 'dma_' API 2021-03-22 13:06:59 +01:00
ddbridge treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dm1105 media: dm1105: switch from 'pci_' to 'dma_' API 2020-11-27 14:10:07 +01:00
dt3155 media: media/pci: use vb2_video_unregister_device() 2020-08-28 15:01:54 +02:00
intel media: ipu3-cio2: Build bridge only if ACPI is enabled 2021-02-06 09:40:04 +01:00
ivtv media: use getter/setter functions 2021-03-11 11:59:42 +01: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: Don't leak SPI master in probe error path 2020-12-07 14:18:57 +00:00
ngene media: ngene: switch from 'pci_' to 'dma_' API 2021-03-11 11:59:46 +01:00
pluto2
pt1 media: media/pci/pt1: Assign value when defining variables 2021-03-22 13:04:05 +01:00
pt3
saa7134 media: saa7134: use sg_dma_len when building pgtable 2021-03-11 11:59:44 +01:00
saa7146 media: saa7146: fix array overflow in vidioc_s_audio() 2020-12-03 07:46:34 +01:00
saa7164 media: pci: saa7164: Rudimentary spelling fixes in the file saa7164-types.h 2021-03-22 11:57:37 +01:00
smipcie media: smipcie: fix interrupt handling and IR timeout 2021-02-05 23:41:25 +01:00
solo6x10 media: solo6x10: Switch to using the new API kobj_to_dev() 2021-03-11 11:59:43 +01:00
sta2x11 media: media/pci: fix kerneldoc issues in two headers 2021-03-22 10:22:50 +01:00
ttpci Networking updates for 5.11 2020-12-15 13:22:29 -08:00
tw68 media: tw68: use generic power management 2020-07-19 14:24:57 +02:00
tw686x media: media/pci: fix kerneldoc issues in two headers 2021-03-22 10:22: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