[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1371543157-14968-1-git-send-email-wangyijing@huawei.com>
Date: Tue, 18 Jun 2013 16:12:37 +0800
From: Yijing Wang <wangyijing@...wei.com>
To: "David S. Miller" <davem@...emloft.net>
CC: <linux-kernel@...r.kernel.org>, Hanjun Guo <guohanjun@...wei.com>,
<jiang.liu@...wei.com>, Yijing Wang <wangyijing@...wei.com>,
Michael Chan <mchan@...adcom.com>, <netdev@...r.kernel.org>
Subject: [PATCH 4/9] 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@...wei.com>
Cc: Michael Chan <mchan@...adcom.com>
Cc: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
---
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 5d20449..324709e 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)
pci_set_master(pdev);
- bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
+ bp->pm_cap = pdev->pm_cap;
if (bp->pm_cap == 0) {
dev_err(&pdev->dev,
"Cannot find power management capability, aborting\n");
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists