summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-12-14 13:35:09 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2023-01-10 15:43:47 +0100
commitc0afc799fb9a19a11f651596fe23b4b755593887 (patch)
tree9c27f1533193d31757744b22b2af9186d23e67ed /drivers/dma
parente70b9d7a74698f1374244b2251216428db920aed (diff)
downloadbarebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.gz
barebox-c0afc799fb9a19a11f651596fe23b4b755593887.tar.xz
Rename struct device_d to device
The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/apbh_dma.c2
-rw-r--r--drivers/dma/map.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c
index 767c095314..f03391fb89 100644
--- a/drivers/dma/apbh_dma.c
+++ b/drivers/dma/apbh_dma.c
@@ -137,7 +137,7 @@ int mxs_dma_go(int chan, struct mxs_dma_cmd *cmd, int ncmds)
/*
* Initialize the DMA hardware
*/
-static int apbh_dma_probe(struct device_d *dev)
+static int apbh_dma_probe(struct device *dev)
{
struct resource *iores;
struct apbh_dma *apbh;
diff --git a/drivers/dma/map.c b/drivers/dma/map.c
index a3e1b3b5b5..a00abf6421 100644
--- a/drivers/dma/map.c
+++ b/drivers/dma/map.c
@@ -3,7 +3,8 @@
#include <dma.h>
-static inline dma_addr_t cpu_to_dma(struct device_d *dev, unsigned long cpu_addr)
+static inline dma_addr_t cpu_to_dma(struct device *dev,
+ unsigned long cpu_addr)
{
dma_addr_t dma_addr = cpu_addr;
@@ -13,7 +14,7 @@ static inline dma_addr_t cpu_to_dma(struct device_d *dev, unsigned long cpu_addr
return dma_addr;
}
-static inline unsigned long dma_to_cpu(struct device_d *dev, dma_addr_t addr)
+static inline unsigned long dma_to_cpu(struct device *dev, dma_addr_t addr)
{
unsigned long cpu_addr = addr;
@@ -23,7 +24,7 @@ static inline unsigned long dma_to_cpu(struct device_d *dev, dma_addr_t addr)
return cpu_addr;
}
-dma_addr_t dma_map_single(struct device_d *dev, void *ptr, size_t size,
+dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
enum dma_data_direction dir)
{
unsigned long addr = (unsigned long)ptr;
@@ -33,7 +34,7 @@ dma_addr_t dma_map_single(struct device_d *dev, void *ptr, size_t size,
return cpu_to_dma(dev, addr);
}
-void dma_unmap_single(struct device_d *dev, dma_addr_t dma_addr, size_t size,
+void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
enum dma_data_direction dir)
{
unsigned long addr = dma_to_cpu(dev, dma_addr);