From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754894AbbIHNS7 (ORCPT ); Tue, 8 Sep 2015 09:18:59 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:35664 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754709AbbIHNS4 (ORCPT ); Tue, 8 Sep 2015 09:18:56 -0400 From: Sudip Mukherjee To: Chris Zankel , Max Filippov Cc: linux-kernel@vger.kernel.org, Andrew Morton , Christoph Hellwig , linux-xtensa@linux-xtensa.org, Sudip Mukherjee Subject: [PATCH 3/4] xtensa: fix errors with dma_supported Date: Tue, 8 Sep 2015 18:48:33 +0530 Message-Id: <1441718314-11208-4-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1441718314-11208-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1441718314-11208-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit eec17ba9f049 ("dma-mapping: consolidate dma_supported") has removed dma_supported() from individual arch files to asm-generic/dma-mapping-common.h or if arch has its own implementation then we need to set the flag HAVE_ARCH_DMA_SUPPORTED. Otherwise we were getting error like: error: redefinition of 'dma_supported' while building with allmodconfig. Signed-off-by: Sudip Mukherjee --- arch/xtensa/include/asm/dma-mapping.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h index 5762d8d..019a94a 100644 --- a/arch/xtensa/include/asm/dma-mapping.h +++ b/arch/xtensa/include/asm/dma-mapping.h @@ -30,10 +30,7 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev) return &xtensa_dma_map_ops; } -#include - -#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_attrs(d, s, h, f, NULL) -#define dma_free_noncoherent(d, s, v, h) dma_free_attrs(d, s, v, h, NULL) +#define HAVE_ARCH_DMA_SUPPORTED 1 static inline int dma_supported(struct device *dev, u64 mask) @@ -41,6 +38,11 @@ dma_supported(struct device *dev, u64 mask) return 1; } +#include + +#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_attrs(d, s, h, f, NULL) +#define dma_free_noncoherent(d, s, v, h) dma_free_attrs(d, s, v, h, NULL) + static inline int dma_set_mask(struct device *dev, u64 mask) { -- 1.9.1