aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2013-09-11 17:35:05 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-09-19 06:30:05 -0400
commit8d0c03dd2d1e8fd0f7ac3d43e90ed99dd748ed7a (patch)
treef0515ace1f8b5833db17022c1675fdb098d383a6
parent5a7bbe86b0b99b1075b97d812946a84ed5fda9ff (diff)
aty128fb: Use pci_dev pm_cap
Use the already existing pm_cap variable in struct pci_dev for determining the power management offset. This saves the driver from having to keep track of an extra variable. Signed-off-by: Jon Mason <jdmason@kudzu.us> Cc: Paul Mackerras <paulus@samba.org> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/aty/aty128fb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index a4dfe8cb0a0a..b5edb6f08b84 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -413,7 +413,6 @@ struct aty128fb_par {
413 int blitter_may_be_busy; 413 int blitter_may_be_busy;
414 int fifo_slots; /* free slots in FIFO (64 max) */ 414 int fifo_slots; /* free slots in FIFO (64 max) */
415 415
416 int pm_reg;
417 int crt_on, lcd_on; 416 int crt_on, lcd_on;
418 struct pci_dev *pdev; 417 struct pci_dev *pdev;
419 struct fb_info *next; 418 struct fb_info *next;
@@ -2016,7 +2015,6 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent)
2016 2015
2017 aty128_init_engine(par); 2016 aty128_init_engine(par);
2018 2017
2019 par->pm_reg = pdev->pm_cap;
2020 par->pdev = pdev; 2018 par->pdev = pdev;
2021 par->asleep = 0; 2019 par->asleep = 0;
2022 par->lock_blank = 0; 2020 par->lock_blank = 0;
@@ -2397,7 +2395,7 @@ static void aty128_set_suspend(struct aty128fb_par *par, int suspend)
2397 u32 pmgt; 2395 u32 pmgt;
2398 struct pci_dev *pdev = par->pdev; 2396 struct pci_dev *pdev = par->pdev;
2399 2397
2400 if (!par->pm_reg) 2398 if (!par->pdev->pm_cap)
2401 return; 2399 return;
2402 2400
2403 /* Set the chip into the appropriate suspend mode (we use D2, 2401 /* Set the chip into the appropriate suspend mode (we use D2,