From 8d0c03dd2d1e8fd0f7ac3d43e90ed99dd748ed7a Mon Sep 17 00:00:00 2001 From: Jon Mason Date: Wed, 11 Sep 2013 14:35:05 -0700 Subject: 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 Cc: Paul Mackerras Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Signed-off-by: Tomi Valkeinen --- drivers/video/aty/aty128fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/video/aty/aty128fb.c') 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 { int blitter_may_be_busy; int fifo_slots; /* free slots in FIFO (64 max) */ - int pm_reg; int crt_on, lcd_on; struct pci_dev *pdev; struct fb_info *next; @@ -2016,7 +2015,6 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent) aty128_init_engine(par); - par->pm_reg = pdev->pm_cap; par->pdev = pdev; par->asleep = 0; par->lock_blank = 0; @@ -2397,7 +2395,7 @@ static void aty128_set_suspend(struct aty128fb_par *par, int suspend) u32 pmgt; struct pci_dev *pdev = par->pdev; - if (!par->pm_reg) + if (!par->pdev->pm_cap) return; /* Set the chip into the appropriate suspend mode (we use D2, -- cgit v1.2.3 From 31b6780c15a4e3a90fe260e977f5186772ce7afb Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Thu, 19 Sep 2013 18:35:55 -0700 Subject: framebuffer: Use fb_ Neaten and shorten the code using the new fb_ macros. Signed-off-by: Joe Perches Signed-off-by: Tomi Valkeinen --- drivers/video/aty/aty128fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/video/aty/aty128fb.c') diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index b5edb6f08b84..12ca031877d4 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c @@ -2027,8 +2027,8 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent) if (register_framebuffer(info) < 0) return 0; - printk(KERN_INFO "fb%d: %s frame buffer device on %s\n", - info->node, info->fix.id, video_card); + fb_info(info, "%s frame buffer device on %s\n", + info->fix.id, video_card); return 1; /* success! */ } -- cgit v1.2.3