Skip to content

Commit

Permalink
ARM: dmabounce: no need to check dev->bus type in needs_bounce function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Jul 4, 2011
1 parent 0703ed2 commit 5c8598f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions arch/arm/common/it8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ static int it8152_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t s
{
dev_dbg(dev, "%s: dma_addr %08x, size %08x\n",
__func__, dma_addr, size);
return dev->bus == &pci_bus_type &&
(dma_addr + size - PHYS_OFFSET) >= SZ_64M;
return (dma_addr + size - PHYS_OFFSET) >= SZ_64M;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ixp4xx/common-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static int abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *r

static int ixp4xx_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
{
return dev->bus == &pci_bus_type && (dma_addr + size) >= SZ_64M;
return (dma_addr + size) >= SZ_64M;
}

/*
Expand Down

0 comments on commit 5c8598f

Please sign in to comment.