From patchwork Mon Jan 23 16:18:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan Ramabadhran X-Patchwork-Id: 718648 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3v6c233PVQz9sdm for ; Tue, 24 Jan 2017 03:18:51 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=codeaurora.org header.i=@codeaurora.org header.b="B2afnHF8"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="XZKRPDM5"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750945AbdAWQSt (ORCPT ); Mon, 23 Jan 2017 11:18:49 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:34030 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbdAWQSs (ORCPT ); Mon, 23 Jan 2017 11:18:48 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A6AED60A06; Mon, 23 Jan 2017 16:18:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1485188328; bh=9955wqi77BqNybCS8X4ZnVaulsc9xydhzRbi4FnZFGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B2afnHF82AikarscYjE8xowbAdsAQFnS7MMYd7M0xrzwlFEvAntPba3FO6pSjjeGh 2sYUT/yZTjKMtPyLibP/uuEItchxjHI/vxX3t7lrE0kzSk26SISxJGuDeozFzUE7fc 2luYhLMncQ+pWxzB+ZtWfuvkIz7JAkrJtkjcT3Cw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED, T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from blr-ubuntu-32.ap.qualcomm.com (unknown [202.46.23.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: sricharan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 83EDF607BF; Mon, 23 Jan 2017 16:18:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1485188323; bh=9955wqi77BqNybCS8X4ZnVaulsc9xydhzRbi4FnZFGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XZKRPDM5hJ9qb8tNlp0yqmt+7E6+b+4jvPwEm7i6C9pNp45nOC63RRpeUPhoHZ4/v ycEjGHlZnOAknV3+hWumdMwMmnRwGDrtS/jcJLWl+O/NWs8YDH6fR+kYr8UqyagNb/ fz3kTOPEfji5cjwCk3DJdCcTOTxk49h4sRghkmMA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 83EDF607BF Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sricharan@codeaurora.org From: Sricharan R To: robin.murphy@arm.com, will.deacon@arm.com, joro@8bytes.org, lorenzo.pieralisi@arm.com, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, m.szyprowski@samsung.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org Cc: sricharan@codeaurora.org Subject: [PATCH V7 04/11] of: dma: Make of_dma_deconfigure() public Date: Mon, 23 Jan 2017 21:48:06 +0530 Message-Id: <1485188293-20263-5-git-send-email-sricharan@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1485188293-20263-1-git-send-email-sricharan@codeaurora.org> References: <1485188293-20263-1-git-send-email-sricharan@codeaurora.org> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Laurent Pinchart As part of moving DMA initializing to probe time the of_dma_deconfigure() function will need to be called from different source files. Make it public and move it to drivers/of/device.c where the of_dma_configure() function is. Signed-off-by: Laurent Pinchart --- drivers/of/device.c | 12 ++++++++++++ drivers/of/platform.c | 5 ----- include/linux/of_device.h | 3 +++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/of/device.c b/drivers/of/device.c index d9898d9..1c843e2 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -136,6 +136,18 @@ void of_dma_configure(struct device *dev, struct device_node *np) } EXPORT_SYMBOL_GPL(of_dma_configure); +/** + * of_dma_deconfigure - Clean up DMA configuration + * @dev: Device for which to clean up DMA configuration + * + * Clean up all configuration performed by of_dma_configure_ops() and free all + * resources that have been allocated. + */ +void of_dma_deconfigure(struct device *dev) +{ + arch_teardown_dma_ops(dev); +} + int of_device_register(struct platform_device *pdev) { device_initialize(&pdev->dev); diff --git a/drivers/of/platform.c b/drivers/of/platform.c index b8064bc..57418f7 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -158,11 +158,6 @@ struct platform_device *of_device_alloc(struct device_node *np, } EXPORT_SYMBOL(of_device_alloc); -static void of_dma_deconfigure(struct device *dev) -{ - arch_teardown_dma_ops(dev); -} - /** * of_platform_device_create_pdata - Alloc, initialize and register an of_device * @np: pointer to node to create device for diff --git a/include/linux/of_device.h b/include/linux/of_device.h index cc7dd687..d20a31a 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -56,6 +56,7 @@ static inline struct device_node *of_cpu_device_node_get(int cpu) } void of_dma_configure(struct device *dev, struct device_node *np); +void of_dma_deconfigure(struct device *dev); #else /* CONFIG_OF */ static inline int of_driver_match_device(struct device *dev, @@ -100,6 +101,8 @@ static inline struct device_node *of_cpu_device_node_get(int cpu) } static inline void of_dma_configure(struct device *dev, struct device_node *np) {} +static inline void of_dma_deconfigure(struct device *dev) +{} #endif /* CONFIG_OF */ #endif /* _LINUX_OF_DEVICE_H */