]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2: use pdev->pm_cap instead of pci_find_capability(.., PCI_CAP_ID_PM)
authorYijing Wang <wangyijing@huawei.com>
Tue, 18 Jun 2013 08:12:37 +0000 (16:12 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Jun 2013 05:22:57 +0000 (22:22 -0700)
commit7bbc6c2a62abaad6d0e6a508f85723ba1e68463c
tree84ea2d16fdafdf02de42c8eb72958d3c1527aa66
parentbac997f91491816d39219c51242684d6eff7419f
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>
drivers/net/ethernet/broadcom/bnx2.c