OpenCloudOS-Kernel/drivers/media/pci/cobalt
Christophe JAILLET 887069f424 media: 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.

It has been compile tested.

@@
@@
-    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>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Akihiro Tsukada <tskd08@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-09-30 10:07:55 +02:00
..
Kconfig media: Kconfig files: use select for V4L2 subdevs and MC 2020-04-14 10:29:05 +02:00
Makefile media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
cobalt-alsa-main.c media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
cobalt-alsa-pcm.c media: cobalt: Drop superfluous ioctl PCM ops 2019-12-13 09:33:12 +01:00
cobalt-alsa-pcm.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
cobalt-alsa.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
cobalt-cpld.c media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
cobalt-cpld.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
cobalt-driver.c media: switch from 'pci_' to 'dma_' API 2021-09-30 10:07:55 +02:00
cobalt-driver.h media: cobalt: fix race condition in setting HPD 2021-05-19 09:51:39 +02:00
cobalt-flash.c media: cobalt: remove redundant assignment to variable data 2019-07-23 08:52:13 -04:00
cobalt-flash.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
cobalt-i2c.c media: pci: cobalt-i2c.c: fix comparison of 0/1 to bool variable 2020-08-29 08:04:01 +02:00
cobalt-i2c.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
cobalt-irq.c media: cobalt: replace VB2_BUF_STATE_REQUEUEING by _ERROR 2019-03-19 13:50:38 -04:00
cobalt-irq.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
cobalt-omnitek.c media: cobalt: cobalt-omnitek.c: fix comparison to bool 2020-08-29 07:47:23 +02:00
cobalt-omnitek.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
cobalt-v4l2.c media: media/pci: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:50 +01:00
cobalt-v4l2.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
m00233_video_measure_memmap_package.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
m00235_fdma_packer_memmap_package.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
m00389_cvi_memmap_package.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
m00460_evcnt_memmap_package.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
m00473_freewheel_memmap_package.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
m00479_clk_loss_detector_memmap_package.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00
m00514_syncgen_flow_evcnt_memmap_package.h media: cobalt: add SPDX license info 2018-02-14 13:15:33 -05:00