aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-07-04 03:34:33 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-07-04 03:39:56 -0400
commit5c8598fca1a359520623ed5409d23bb9e23d7da3 (patch)
tree16dd1ae0911bad1d22c213f9e59ef86f916c1c94
parent0703ed2a6b260cd743adf49a8281eb064d728832 (diff)
ARM: dmabounce: no need to check dev->bus type in needs_bounce function
As the needs_bounce function is passed at DMA bounce register time, we already know what the device bus type is, so we don't need to check it each time the needs_bounce function is called. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/common/it8152.c3
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
index 80b49e1e099..14ad62e16dd 100644
--- a/arch/arm/common/it8152.c
+++ b/arch/arm/common/it8152.c
@@ -247,8 +247,7 @@ static int it8152_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t s
247{ 247{
248 dev_dbg(dev, "%s: dma_addr %08x, size %08x\n", 248 dev_dbg(dev, "%s: dma_addr %08x, size %08x\n",
249 __func__, dma_addr, size); 249 __func__, dma_addr, size);
250 return dev->bus == &pci_bus_type && 250 return (dma_addr + size - PHYS_OFFSET) >= SZ_64M;
251 (dma_addr + size - PHYS_OFFSET) >= SZ_64M;
252} 251}
253 252
254/* 253/*
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index d7db10cfe53..e2e98bbb641 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -318,7 +318,7 @@ static int abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *r
318 318
319static int ixp4xx_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) 319static int ixp4xx_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
320{ 320{
321 return dev->bus == &pci_bus_type && (dma_addr + size) >= SZ_64M; 321 return (dma_addr + size) >= SZ_64M;
322} 322}
323 323
324/* 324/*