Commit 8d0c03dd authored by Jon Mason's avatar Jon Mason Committed by Tomi Valkeinen

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: default avatarJon 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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 5a7bbe86
...@@ -413,7 +413,6 @@ struct aty128fb_par { ...@@ -413,7 +413,6 @@ struct aty128fb_par {
int blitter_may_be_busy; int blitter_may_be_busy;
int fifo_slots; /* free slots in FIFO (64 max) */ int fifo_slots; /* free slots in FIFO (64 max) */
int pm_reg;
int crt_on, lcd_on; int crt_on, lcd_on;
struct pci_dev *pdev; struct pci_dev *pdev;
struct fb_info *next; struct fb_info *next;
...@@ -2016,7 +2015,6 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -2016,7 +2015,6 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent)
aty128_init_engine(par); aty128_init_engine(par);
par->pm_reg = pdev->pm_cap;
par->pdev = pdev; par->pdev = pdev;
par->asleep = 0; par->asleep = 0;
par->lock_blank = 0; par->lock_blank = 0;
...@@ -2397,7 +2395,7 @@ static void aty128_set_suspend(struct aty128fb_par *par, int suspend) ...@@ -2397,7 +2395,7 @@ static void aty128_set_suspend(struct aty128fb_par *par, int suspend)
u32 pmgt; u32 pmgt;
struct pci_dev *pdev = par->pdev; struct pci_dev *pdev = par->pdev;
if (!par->pm_reg) if (!par->pdev->pm_cap)
return; return;
/* Set the chip into the appropriate suspend mode (we use D2, /* Set the chip into the appropriate suspend mode (we use D2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment