Skip to content

Commit

Permalink
ioat/dca: Use dev_is_pci() to check whether it is pci device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yijing Wang authored and Dan Williams committed Apr 10, 2014
1 parent dcb99fd commit 1fde254
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/dma/ioat/dca.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static int ioat_dca_add_requester(struct dca_provider *dca, struct device *dev)
u16 id;

/* This implementation only supports PCI-Express */
if (dev->bus != &pci_bus_type)
if (!dev_is_pci(dev))
return -ENODEV;
pdev = to_pci_dev(dev);
id = dcaid_from_pcidev(pdev);
Expand Down Expand Up @@ -179,7 +179,7 @@ static int ioat_dca_remove_requester(struct dca_provider *dca,
int i;

/* This implementation only supports PCI-Express */
if (dev->bus != &pci_bus_type)
if (!dev_is_pci(dev))
return -ENODEV;
pdev = to_pci_dev(dev);

Expand Down Expand Up @@ -320,7 +320,7 @@ static int ioat2_dca_add_requester(struct dca_provider *dca, struct device *dev)
u16 global_req_table;

/* This implementation only supports PCI-Express */
if (dev->bus != &pci_bus_type)
if (!dev_is_pci(dev))
return -ENODEV;
pdev = to_pci_dev(dev);
id = dcaid_from_pcidev(pdev);
Expand Down Expand Up @@ -354,7 +354,7 @@ static int ioat2_dca_remove_requester(struct dca_provider *dca,
u16 global_req_table;

/* This implementation only supports PCI-Express */
if (dev->bus != &pci_bus_type)
if (!dev_is_pci(dev))
return -ENODEV;
pdev = to_pci_dev(dev);

Expand Down Expand Up @@ -496,7 +496,7 @@ static int ioat3_dca_add_requester(struct dca_provider *dca, struct device *dev)
u16 global_req_table;

/* This implementation only supports PCI-Express */
if (dev->bus != &pci_bus_type)
if (!dev_is_pci(dev))
return -ENODEV;
pdev = to_pci_dev(dev);
id = dcaid_from_pcidev(pdev);
Expand Down Expand Up @@ -530,7 +530,7 @@ static int ioat3_dca_remove_requester(struct dca_provider *dca,
u16 global_req_table;

/* This implementation only supports PCI-Express */
if (dev->bus != &pci_bus_type)
if (!dev_is_pci(dev))
return -ENODEV;
pdev = to_pci_dev(dev);

Expand Down

0 comments on commit 1fde254

Please sign in to comment.