aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-02-03 07:35:55 -0700
committerSimon Glass <sjg@chromium.org>2020-02-05 19:33:46 -0700
commitaae95882232a24ee49c89d0356febf3685a87c8a (patch)
tree15c15bc6d248b54a8f7bc2b38941203e766b5db1
parentfb8c0d595f1ad83bee5dd398b59b0ee16d8d15a9 (diff)
downloadu-boot-aae95882232a24ee49c89d0356febf3685a87c8a.zip
u-boot-aae95882232a24ee49c89d0356febf3685a87c8a.tar.gz
u-boot-aae95882232a24ee49c89d0356febf3685a87c8a.tar.bz2
dma: Rename free() to rfree()
This function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree(). Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--drivers/dma/dma-uclass.c4
-rw-r--r--drivers/dma/sandbox-dma-test.c4
-rw-r--r--drivers/dma/ti/k3-udma.c4
-rw-r--r--include/dma-uclass.h4
4 files changed, 8 insertions, 8 deletions
diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
index 5598bca..a0159d7 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -122,10 +122,10 @@ int dma_free(struct dma *dma)
debug("%s(dma=%p)\n", __func__, dma);
- if (!ops->free)
+ if (!ops->rfree)
return 0;
- return ops->free(dma);
+ return ops->rfree(dma);
}
int dma_enable(struct dma *dma)
diff --git a/drivers/dma/sandbox-dma-test.c b/drivers/dma/sandbox-dma-test.c
index 8fcef18..d009bb2 100644
--- a/drivers/dma/sandbox-dma-test.c
+++ b/drivers/dma/sandbox-dma-test.c
@@ -88,7 +88,7 @@ static int sandbox_dma_request(struct dma *dma)
return 0;
}
-static int sandbox_dma_free(struct dma *dma)
+static int sandbox_dma_rfree(struct dma *dma)
{
struct sandbox_dma_dev *ud = dev_get_priv(dma->dev);
struct sandbox_dma_chan *uc;
@@ -229,7 +229,7 @@ static const struct dma_ops sandbox_dma_ops = {
.transfer = sandbox_dma_transfer,
.of_xlate = sandbox_dma_of_xlate,
.request = sandbox_dma_request,
- .free = sandbox_dma_free,
+ .rfree = sandbox_dma_rfree,
.enable = sandbox_dma_enable,
.disable = sandbox_dma_disable,
.send = sandbox_dma_send,
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 95f6b5a..5820c82 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -1551,7 +1551,7 @@ static int udma_request(struct dma *dma)
return 0;
}
-static int udma_free(struct dma *dma)
+static int udma_rfree(struct dma *dma)
{
struct udma_dev *ud = dev_get_priv(dma->dev);
struct udma_chan *uc;
@@ -1846,7 +1846,7 @@ static const struct dma_ops udma_ops = {
.transfer = udma_transfer,
.of_xlate = udma_of_xlate,
.request = udma_request,
- .free = udma_free,
+ .rfree = udma_rfree,
.enable = udma_enable,
.disable = udma_disable,
.send = udma_send,
diff --git a/include/dma-uclass.h b/include/dma-uclass.h
index a1d9d26..340437a 100644
--- a/include/dma-uclass.h
+++ b/include/dma-uclass.h
@@ -58,14 +58,14 @@ struct dma_ops {
*/
int (*request)(struct dma *dma);
/**
- * free - Free a previously requested dma.
+ * rfree - Free a previously requested dma.
*
* This is the implementation of the client dma_free() API.
*
* @dma: The DMA to free.
* @return 0 if OK, or a negative error code.
*/
- int (*free)(struct dma *dma);
+ int (*rfree)(struct dma *dma);
/**
* enable() - Enable a DMA Channel.
*