Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756807Ab3H2Sc4 (ORCPT ); Thu, 29 Aug 2013 14:32:56 -0400 Received: from smtp.citrix.com ([66.165.176.89]:8808 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753544Ab3H2Scy (ORCPT ); Thu, 29 Aug 2013 14:32:54 -0400 X-IronPort-AV: E=Sophos;i="4.89,984,1367971200"; d="scan'208";a="48860313" From: Stefano Stabellini To: CC: , , , , , Stefano Stabellini , , Subject: [PATCH v5 02/13] arm: introduce a global dma_ops pointer Date: Thu, 29 Aug 2013 19:32:23 +0100 Message-ID: <1377801154-29215-2-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1899 Lines: 59 Initially set dma_ops to arm_dma_ops. Signed-off-by: Stefano Stabellini Acked-by: Konrad Rzeszutek Wilk CC: will.deacon@arm.com CC: linux@arm.linux.org.uk Changes in v3: - keep using arm_dma_ops in dmabounce. --- arch/arm/include/asm/dma-mapping.h | 3 ++- arch/arm/mm/dma-mapping.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 0982206..7d6e4f9 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -13,6 +13,7 @@ #include #define DMA_ERROR_CODE (~0) +extern struct dma_map_ops *dma_ops; extern struct dma_map_ops arm_dma_ops; extern struct dma_map_ops arm_coherent_dma_ops; @@ -20,7 +21,7 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev) { if (dev && dev->archdata.dma_ops) return dev->archdata.dma_ops; - return &arm_dma_ops; + return dma_ops; } static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 7f9b179..870b12c 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -141,6 +141,9 @@ struct dma_map_ops arm_dma_ops = { }; EXPORT_SYMBOL(arm_dma_ops); +struct dma_map_ops *dma_ops = &arm_dma_ops; +EXPORT_SYMBOL(dma_ops); + static void *arm_coherent_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs); static void arm_coherent_dma_free(struct device *dev, size_t size, void *cpu_addr, -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/