From patchwork Fri Jan 17 15:29:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11339453 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E7B292A for ; Fri, 17 Jan 2020 15:29:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB72124653 for ; Fri, 17 Jan 2020 15:29:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729015AbgAQP3l (ORCPT ); Fri, 17 Jan 2020 10:29:41 -0500 Received: from michel.telenet-ops.be ([195.130.137.88]:35878 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728816AbgAQP3l (ORCPT ); Fri, 17 Jan 2020 10:29:41 -0500 Received: from ramsan ([84.195.182.253]) by michel.telenet-ops.be with bizsmtp id rTVe210065USYZQ06TVehv; Fri, 17 Jan 2020 16:29:38 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1isTZ4-0002FG-07; Fri, 17 Jan 2020 16:29:38 +0100 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1isTZ3-00087j-VF; Fri, 17 Jan 2020 16:29:37 +0100 From: Geert Uytterhoeven To: Vinod Koul , Dan Williams Cc: Lars-Peter Clausen , Matt Porter , Arnd Bergmann , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 3/3] dmaengine: Move dma_get_{,any_}slave_channel() to private dmaengine.h Date: Fri, 17 Jan 2020 16:29:33 +0100 Message-Id: <20200117152933.31175-4-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200117152933.31175-1-geert+renesas@glider.be> References: <20200117152933.31175-1-geert+renesas@glider.be> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org 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 to the private header file drivers/dma/dmaengine.h. Signed-off-by: Geert Uytterhoeven --- 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 #include +#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)