From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 593A1DDD0B for ; Fri, 20 Feb 2009 07:49:44 +1100 (EST) From: Kumar Gala To: Subject: [PATCH 3/3] powerpc: expect all devices calling dma ops to have archdata set Date: Thu, 19 Feb 2009 14:49:17 -0600 Message-Id: <1235076557-24464-3-git-send-email-galak@kernel.crashing.org> In-Reply-To: <1235076557-24464-2-git-send-email-galak@kernel.crashing.org> References: <1235076557-24464-1-git-send-email-galak@kernel.crashing.org> <1235076557-24464-2-git-send-email-galak@kernel.crashing.org> Cc: linuxppc-dev@ozlabs.org, arnd@arndb.de List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Now that we set archdata for of_platform and platform devices via platform_notify() we no longer need to special case having a NULL device pointer or NULL archdata. It should be a driver error if this condition shows up and the driver should be fixed. Signed-off-by: Kumar Gala --- arch/powerpc/include/asm/dma-mapping.h | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h index 86cef7d..c69f2b5 100644 --- a/arch/powerpc/include/asm/dma-mapping.h +++ b/arch/powerpc/include/asm/dma-mapping.h @@ -109,18 +109,8 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev) * only ISA DMA device we support is the floppy and we have a hack * in the floppy driver directly to get a device for us. */ - - if (unlikely(dev == NULL) || dev->archdata.dma_ops == NULL) { -#ifdef CONFIG_PPC64 + if (unlikely(dev == NULL)) return NULL; -#else - /* Use default on 32-bit if dma_ops is not set up */ - /* TODO: Long term, we should fix drivers so that dev and - * archdata dma_ops are set up for all buses. - */ - return &dma_direct_ops; -#endif - } return dev->archdata.dma_ops; } -- 1.5.6.6