Commit d317ac17 authored by Yijing Wang's avatar Yijing Wang Committed by Benjamin Herrenschmidt

powerpc/pci: Use dev_is_pci() to check whether it is pci device

Use PCI standard marco dev_is_pci() instead of directly compare
pci_bus_type to check whether it is pci device.
Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 5877231f
...@@ -122,7 +122,7 @@ static int fsl_pci_dma_set_mask(struct device *dev, u64 dma_mask) ...@@ -122,7 +122,7 @@ static int fsl_pci_dma_set_mask(struct device *dev, u64 dma_mask)
* address width of the SoC such that we can address any internal * address width of the SoC such that we can address any internal
* SoC address from across PCI if needed * SoC address from across PCI if needed
*/ */
if ((dev->bus == &pci_bus_type) && if ((dev_is_pci(dev)) &&
dma_mask >= DMA_BIT_MASK(MAX_PHYS_ADDR_BITS)) { dma_mask >= DMA_BIT_MASK(MAX_PHYS_ADDR_BITS)) {
set_dma_ops(dev, &dma_direct_ops); set_dma_ops(dev, &dma_direct_ops);
set_dma_offset(dev, pci64_dma_offset); set_dma_offset(dev, pci64_dma_offset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment