aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioat
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2013-12-05 06:31:18 -0500
committerDan Williams <dan.j.williams@intel.com>2014-04-10 15:17:34 -0400
commit1fde2548460c1ded9fe71220b506473f0b7de768 (patch)
treeed1774b6a0671c42b90900b366d1a8fcf644028a /drivers/dma/ioat
parentdcb99fd9b08cfe1afe426af4d8d3cbc429190f15 (diff)
ioat/dca: 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: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/ioat')
-rw-r--r--drivers/dma/ioat/dca.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/dma/ioat/dca.c b/drivers/dma/ioat/dca.c
index 9e84d5bc9307..79009632830d 100644
--- a/drivers/dma/ioat/dca.c
+++ b/drivers/dma/ioat/dca.c
@@ -147,7 +147,7 @@ static int ioat_dca_add_requester(struct dca_provider *dca, struct device *dev)
147 u16 id; 147 u16 id;
148 148
149 /* This implementation only supports PCI-Express */ 149 /* This implementation only supports PCI-Express */
150 if (dev->bus != &pci_bus_type) 150 if (!dev_is_pci(dev))
151 return -ENODEV; 151 return -ENODEV;
152 pdev = to_pci_dev(dev); 152 pdev = to_pci_dev(dev);
153 id = dcaid_from_pcidev(pdev); 153 id = dcaid_from_pcidev(pdev);
@@ -179,7 +179,7 @@ static int ioat_dca_remove_requester(struct dca_provider *dca,
179 int i; 179 int i;
180 180
181 /* This implementation only supports PCI-Express */ 181 /* This implementation only supports PCI-Express */
182 if (dev->bus != &pci_bus_type) 182 if (!dev_is_pci(dev))
183 return -ENODEV; 183 return -ENODEV;
184 pdev = to_pci_dev(dev); 184 pdev = to_pci_dev(dev);
185 185
@@ -320,7 +320,7 @@ static int ioat2_dca_add_requester(struct dca_provider *dca, struct device *dev)
320 u16 global_req_table; 320 u16 global_req_table;
321 321
322 /* This implementation only supports PCI-Express */ 322 /* This implementation only supports PCI-Express */
323 if (dev->bus != &pci_bus_type) 323 if (!dev_is_pci(dev))
324 return -ENODEV; 324 return -ENODEV;
325 pdev = to_pci_dev(dev); 325 pdev = to_pci_dev(dev);
326 id = dcaid_from_pcidev(pdev); 326 id = dcaid_from_pcidev(pdev);
@@ -354,7 +354,7 @@ static int ioat2_dca_remove_requester(struct dca_provider *dca,
354 u16 global_req_table; 354 u16 global_req_table;
355 355
356 /* This implementation only supports PCI-Express */ 356 /* This implementation only supports PCI-Express */
357 if (dev->bus != &pci_bus_type) 357 if (!dev_is_pci(dev))
358 return -ENODEV; 358 return -ENODEV;
359 pdev = to_pci_dev(dev); 359 pdev = to_pci_dev(dev);
360 360
@@ -496,7 +496,7 @@ static int ioat3_dca_add_requester(struct dca_provider *dca, struct device *dev)
496 u16 global_req_table; 496 u16 global_req_table;
497 497
498 /* This implementation only supports PCI-Express */ 498 /* This implementation only supports PCI-Express */
499 if (dev->bus != &pci_bus_type) 499 if (!dev_is_pci(dev))
500 return -ENODEV; 500 return -ENODEV;
501 pdev = to_pci_dev(dev); 501 pdev = to_pci_dev(dev);
502 id = dcaid_from_pcidev(pdev); 502 id = dcaid_from_pcidev(pdev);
@@ -530,7 +530,7 @@ static int ioat3_dca_remove_requester(struct dca_provider *dca,
530 u16 global_req_table; 530 u16 global_req_table;
531 531
532 /* This implementation only supports PCI-Express */ 532 /* This implementation only supports PCI-Express */
533 if (dev->bus != &pci_bus_type) 533 if (!dev_is_pci(dev))
534 return -ENODEV; 534 return -ENODEV;
535 pdev = to_pci_dev(dev); 535 pdev = to_pci_dev(dev);
536 536