diff options
author | Yijing Wang <wangyijing@huawei.com> | 2013-06-18 04:12:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-20 01:22:57 -0400 |
commit | 85768271315bd368c86a0783bf0c85019afbabec (patch) | |
tree | 84ea2d16fdafdf02de42c8eb72958d3c1527aa66 /drivers/net | |
parent | f9c7da5eaf10fa1d7a91b83aefc6fb8e3a4ad39c (diff) |
bnx2: use pdev->pm_cap instead of pci_find_capability(.., PCI_CAP_ID_PM)
Pci core has been saved pm cap register offset by pdev->pm_cap in pci_pm_init()
in init path. So we can use pdev->pm_cap instead of using
pci_find_capability(pdev, PCI_CAP_ID_PM) for better performance and simplified code.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Michael Chan <mchan@broadcom.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 1a1b23eb13dc..6a2de1d79ff6 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c | |||
@@ -8104,7 +8104,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
8104 | 8104 | ||
8105 | pci_set_master(pdev); | 8105 | pci_set_master(pdev); |
8106 | 8106 | ||
8107 | bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); | 8107 | bp->pm_cap = pdev->pm_cap; |
8108 | if (bp->pm_cap == 0) { | 8108 | if (bp->pm_cap == 0) { |
8109 | dev_err(&pdev->dev, | 8109 | dev_err(&pdev->dev, |
8110 | "Cannot find power management capability, aborting\n"); | 8110 | "Cannot find power management capability, aborting\n"); |