OpenCloudOS-Kernel/drivers/net/wireless/ath/ath5k
Christophe JAILLET 923a134647 ath: 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.

While at it, some 'dma_set_mask()/dma_set_coherent_mask()' have been
updated to a much less verbose 'dma_set_mask_and_coherent()'.

@@ @@
-    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: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/9150bd6cde9ad592aff8ee3ad94dffa90b004e89.1624720959.git.christophe.jaillet@wanadoo.fr
2021-07-02 14:39:59 +03:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile ath: fix SPDX tags 2019-06-26 18:11:06 +03:00
ahb.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
ani.c ath5k: remove conversion to bool in ath5k_ani_calibration() 2020-04-28 12:11:27 +03:00
ani.h
ath5k.h ath5k: Replace HTTP links with HTTPS ones 2020-08-14 18:06:36 +03:00
attach.c ath: Remove unnecessary ath_bcast_mac and use eth_broadcast_addr 2018-03-29 12:10:26 +03:00
base.c module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
base.h
caps.c
debug.c ath5k: convert to use DEFINE_SEQ_ATTRIBUTE macro 2020-09-22 10:46:21 +03:00
debug.h
desc.c locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
desc.h
dma.c
eeprom.c ath5k: Use fallthrough pseudo-keyword 2020-08-17 13:19:33 +03:00
eeprom.h
gpio.c
initvals.c
led.c ath5k: Change led pin configuration for compaq c700 laptop 2016-04-04 17:03:22 +03:00
mac80211-ops.c ath: Modify ath_key_delete() to not need full key entry 2020-12-17 08:51:17 +02:00
pci.c ath: switch from 'pci_' to 'dma_' API 2021-07-02 14:39:59 +03:00
pcu.c ath5k: Fix wrong function name in comments 2021-06-15 17:01:24 +03:00
phy.c ath5k: Use fallthrough pseudo-keyword 2020-08-17 13:19:33 +03:00
qcu.c ath5k: remove duplicated re-assignment to pointer 'tq' 2018-02-27 18:45:48 +02:00
reg.h
reset.c ath5k: Use fallthrough pseudo-keyword 2020-08-17 13:19:33 +03:00
rfbuffer.h ath5k: Replace HTTP links with HTTPS ones 2020-08-14 18:06:36 +03:00
rfgain.h
rfkill.c ath5k: convert tasklets to use new tasklet_setup() API 2020-08-27 13:15:25 +03:00
sysfs.c wireless: Use octal not symbolic permissions 2018-03-27 11:01:13 +03:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00