From: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, arnd@arndb.de
Subject: [PATCH 3/3] powerpc: expect all devices calling dma ops to have archdata set
Date: Thu, 19 Feb 2009 14:49:17 -0600 [thread overview]
Message-ID: <1235076557-24464-3-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1235076557-24464-2-git-send-email-galak@kernel.crashing.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 <galak@kernel.crashing.org>
---
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
next prev parent reply other threads:[~2009-02-19 20:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-19 20:49 [PATCH 1/3] powerpc/pci: Default to dma_direct_ops for pci dma_ops Kumar Gala
2009-02-19 20:49 ` [PATCH 2/3] powerpc: setup archdata for {of_}platform via a single platform_notify Kumar Gala
2009-02-19 20:49 ` Kumar Gala [this message]
2009-02-19 22:08 ` [PATCH 3/3] powerpc: expect all devices calling dma ops to have archdata set Benjamin Krill
2009-02-20 20:45 ` Becky Bruce
2009-02-19 22:08 ` [PATCH 2/3] powerpc: setup archdata for {of_}platform via a single platform_notify Benjamin Krill
2009-02-20 20:44 ` Becky Bruce
2009-03-04 4:56 ` Benjamin Herrenschmidt
2009-02-19 20:58 ` [PATCH 1/3] powerpc/pci: Default to dma_direct_ops for pci dma_ops Kumar Gala
2009-02-19 22:08 ` Benjamin Krill
2009-02-20 20:44 ` Becky Bruce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1235076557-24464-3-git-send-email-galak@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=arnd@arndb.de \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).