From patchwork Thu Mar 19 13:40:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kumar Gala X-Patchwork-Id: 24678 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 298CDDE5AA for ; Fri, 20 Mar 2009 00:41:55 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org 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 D4F69DDDA5 for ; Fri, 20 Mar 2009 00:41:05 +1100 (EST) Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id n2JDetHn010235; Thu, 19 Mar 2009 08:40:56 -0500 From: Kumar Gala To: Subject: [PATCH v2 3/3] powerpc: expect all devices calling dma ops to have archdata set Date: Thu, 19 Mar 2009 08:40:52 -0500 Message-Id: <1237470052-4071-3-git-send-email-galak@kernel.crashing.org> X-Mailer: git-send-email 1.5.6.6 In-Reply-To: <1237470052-4071-2-git-send-email-galak@kernel.crashing.org> References: <1237470052-4071-1-git-send-email-galak@kernel.crashing.org> <1237470052-4071-2-git-send-email-galak@kernel.crashing.org> Cc: linuxppc-dev@ozlabs.org, Becky Bruce X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org 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 Acked-by: Benjamin Krill --- 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; }