summaryrefslogtreecommitdiffstats
path: root/drivers/video/aty
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2013-06-26 09:13:41 +0800
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-27 09:35:36 +0300
commit66be736921f955192ad4f75f2db38c903b191f3b (patch)
tree50cd6c4917734cdae9a80023642f32eea57d8cdf /drivers/video/aty
parent394c90f2a325a7fc9f0525517a4cc3708207b4db (diff)
downloadblackbird-obmc-linux-66be736921f955192ad4f75f2db38c903b191f3b.tar.gz
blackbird-obmc-linux-66be736921f955192ad4f75f2db38c903b191f3b.zip
radeon: 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: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/aty')
-rw-r--r--drivers/video/aty/radeon_pm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c
index 92bda5848516..f7091ece580d 100644
--- a/drivers/video/aty/radeon_pm.c
+++ b/drivers/video/aty/radeon_pm.c
@@ -2805,7 +2805,7 @@ static void radeonfb_early_resume(void *data)
void radeonfb_pm_init(struct radeonfb_info *rinfo, int dynclk, int ignore_devlist, int force_sleep)
{
/* Find PM registers in config space if any*/
- rinfo->pm_reg = pci_find_capability(rinfo->pdev, PCI_CAP_ID_PM);
+ rinfo->pm_reg = rinfo->pdev->pm_cap;
/* Enable/Disable dynamic clocks: TODO add sysfs access */
if (rinfo->family == CHIP_FAMILY_RS480)
OpenPOWER on IntegriCloud