OpenCloudOS-Kernel/drivers/media/pci/ddbridge
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: ddbridge: use the ddbridge's own dummy fe driver 2020-04-14 10:29:05 +02:00
Makefile media: ddbridge: use the ddbridge's own dummy fe driver 2020-04-14 10:29:05 +02:00
ddbridge-ci.c media: ddbridge: header/boilerplate cleanups and cosmetics 2018-09-12 07:18:44 -04:00
ddbridge-ci.h media: ddbridge: header/boilerplate cleanups and cosmetics 2018-09-12 07:18:44 -04:00
ddbridge-core.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ddbridge-dummy-fe.c media: ddbridge: use the ddbridge's own dummy fe driver 2020-04-14 10:29:05 +02:00
ddbridge-dummy-fe.h media: ddbridge: use the ddbridge's own dummy fe driver 2020-04-14 10:29:05 +02:00
ddbridge-hw.c media: ddbridge: header/boilerplate cleanups and cosmetics 2018-09-12 07:18:44 -04:00
ddbridge-hw.h media: ddbridge: header/boilerplate cleanups and cosmetics 2018-09-12 07:18:44 -04:00
ddbridge-i2c.c media: ddbridge: header/boilerplate cleanups and cosmetics 2018-09-12 07:18:44 -04:00
ddbridge-i2c.h media: ddbridge: header/boilerplate cleanups and cosmetics 2018-09-12 07:18:44 -04:00
ddbridge-io.h media: ddbridge: header/boilerplate cleanups and cosmetics 2018-09-12 07:18:44 -04:00
ddbridge-main.c media: switch from 'pci_' to 'dma_' API 2021-09-30 10:07:55 +02:00
ddbridge-max.c media: ddbridge: header/boilerplate cleanups and cosmetics 2018-09-12 07:18:44 -04:00
ddbridge-max.h media: ddbridge: header/boilerplate cleanups and cosmetics 2018-09-12 07:18:44 -04:00
ddbridge-mci.c media: ddbridge/mci: split MaxSX8 specific code off to ddbridge-sx8.c 2018-07-30 16:23:12 -04:00
ddbridge-mci.h media: ddbridge/mci: add SX8 I/Q mode remark and remove DIAG CMD defines 2018-07-30 16:23:12 -04:00
ddbridge-regs.h media: ddbridge: header/boilerplate cleanups and cosmetics 2018-09-12 07:18:44 -04:00
ddbridge-sx8.c media: ddbridge/sx8: remove redundant check of iq_mode == 2 2018-09-12 09:14:05 -04:00
ddbridge.h media: ddbridge: Move asm includes after linux ones 2018-12-20 06:42:14 -05:00