Skip to content

Commit

Permalink
aty128fb: use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_…
Browse files Browse the repository at this point in the history
…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: Paul Mackerras <paulus@samba.org>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Yijing Wang authored and Tomi Valkeinen committed Jun 27, 2013
1 parent d22cd30 commit 394c90f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/aty/aty128fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent)

aty128_init_engine(par);

par->pm_reg = pci_find_capability(pdev, PCI_CAP_ID_PM);
par->pm_reg = pdev->pm_cap;
par->pdev = pdev;
par->asleep = 0;
par->lock_blank = 0;
Expand Down

0 comments on commit 394c90f

Please sign in to comment.