[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200117152933.31175-4-geert+renesas@glider.be>
Date: Fri, 17 Jan 2020 16:29:33 +0100
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Vinod Koul <vkoul@...nel.org>,
Dan Williams <dan.j.williams@...el.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
Matt Porter <mporter@...sulko.com>,
Arnd Bergmann <arnd@...db.de>, dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH 3/3] dmaengine: Move dma_get_{,any_}slave_channel() to private dmaengine.h
The functions dma_get_slave_channel() and dma_get_any_slave_channel()
are called from DMA engine drivers only. Hence move their declarations
from the public header file <linux/dmaengine.h> to the private header
file drivers/dma/dmaengine.h.
Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
---
drivers/dma/dmaengine.h | 3 +++
drivers/dma/of-dma.c | 2 ++
include/linux/dmaengine.h | 2 --
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/dmaengine.h b/drivers/dma/dmaengine.h
index 501c0b063f852d9a..488c8a5cbd3b1a4a 100644
--- a/drivers/dma/dmaengine.h
+++ b/drivers/dma/dmaengine.h
@@ -171,4 +171,7 @@ dmaengine_desc_callback_valid(struct dmaengine_desc_callback *cb)
return (cb->callback) ? true : false;
}
+struct dma_chan *dma_get_slave_channel(struct dma_chan *chan);
+struct dma_chan *dma_get_any_slave_channel(struct dma_device *device);
+
#endif
diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c
index c2d779daa4b51ac8..b2c2b5e8093cf0d7 100644
--- a/drivers/dma/of-dma.c
+++ b/drivers/dma/of-dma.c
@@ -15,6 +15,8 @@
#include <linux/of.h>
#include <linux/of_dma.h>
+#include "dmaengine.h"
+
static LIST_HEAD(of_dma_list);
static DEFINE_MUTEX(of_dma_lock);
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 8318645ddc1289c9..2cd1d6d7ef0fcce5 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -1411,8 +1411,6 @@ int dma_async_device_register(struct dma_device *device);
int dmaenginem_async_device_register(struct dma_device *device);
void dma_async_device_unregister(struct dma_device *device);
void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
-struct dma_chan *dma_get_slave_channel(struct dma_chan *chan);
-struct dma_chan *dma_get_any_slave_channel(struct dma_device *device);
#define dma_request_channel(mask, x, y) \
__dma_request_channel(&(mask), x, y, NULL)
--
2.17.1
Powered by blists - more mailing lists