summaryrefslogtreecommitdiffstats
path: root/drivers/video/tridentfb.c
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2008-07-23 21:30:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 10:47:34 -0700
commitea8ee55c12f77cbbb6e067f91e0cd794baa692ab (patch)
treeb8e56b625cb06974cfc4aca1214320555482a705 /drivers/video/tridentfb.c
parente09ed099d0169ac3a22b17cfeece0fa54a9e43eb (diff)
tridentfb: move global pseudo palette into structure
This patch moves pseudo palette int tridentfb_par structure and removes global default_var. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/tridentfb.c')
-rw-r--r--drivers/video/tridentfb.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
index cb37e10734b..0f6e4054c99 100644
--- a/drivers/video/tridentfb.c
+++ b/drivers/video/tridentfb.c
@@ -28,16 +28,12 @@
struct tridentfb_par {
void __iomem *io_virt; /* iospace virtual memory address */
+ u32 pseudo_pal[16];
};
static unsigned char eng_oper; /* engine operation... */
static struct fb_ops tridentfb_ops;
-/* FIXME:kmalloc these 3 instead */
-static u32 pseudo_pal[16];
-
-static struct fb_var_screeninfo default_var;
-
static struct fb_fix_screeninfo tridentfb_fix = {
.id = "Trident",
.type = FB_TYPE_PACKED_PIXELS,
@@ -1340,9 +1336,7 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
#ifdef CONFIG_FB_TRIDENT_ACCEL
info->flags |= FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT;
#endif
- info->pseudo_palette = pseudo_pal;
-
- if (!fb_find_mode(&default_var, info,
+ if (!fb_find_mode(&info->var, info,
mode_option, NULL, 0, NULL, bpp)) {
err = -EINVAL;
goto out_unmap2;
@@ -1352,11 +1346,10 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
goto out_unmap2;
if (defaultaccel && acc)
- default_var.accel_flags |= FB_ACCELF_TEXT;
+ info->var.accel_flags |= FB_ACCELF_TEXT;
else
- default_var.accel_flags &= ~FB_ACCELF_TEXT;
- default_var.activate |= FB_ACTIVATE_NOW;
- info->var = default_var;
+ info->var.accel_flags &= ~FB_ACCELF_TEXT;
+ info->var.activate |= FB_ACTIVATE_NOW;
info->device = &dev->dev;
if (register_framebuffer(info) < 0) {
printk(KERN_ERR "tridentfb: could not register Trident framebuffer\n");
@@ -1365,8 +1358,8 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
goto out_unmap2;
}
output("fb%d: %s frame buffer device %dx%d-%dbpp\n",
- info->node, info->fix.id, default_var.xres,
- default_var.yres, default_var.bits_per_pixel);
+ info->node, info->fix.id, info->var.xres,
+ info->var.yres, info->var.bits_per_pixel);
pci_set_drvdata(dev, info);
return 0;