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>
{
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;
}
/*
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;
}
/*