Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131278
b: refs/heads/master
c: b14caec
h: refs/heads/master
v: v3
  • Loading branch information
Andres Salomon authored and Linus Torvalds committed Feb 11, 2009
1 parent 24663c0 commit a81f3bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 067f1293cc5916f8d88b602beeb8787d58515608
refs/heads/master: b14caecdbe7730bf82c8510f1ba52e00273e15c4
17 changes: 11 additions & 6 deletions trunk/drivers/video/geode/gxfb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,10 @@ static int gxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)

static int gxfb_set_par(struct fb_info *info)
{
if (info->var.bits_per_pixel > 8) {
if (info->var.bits_per_pixel > 8)
info->fix.visual = FB_VISUAL_TRUECOLOR;
fb_dealloc_cmap(&info->cmap);
} else {
else
info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
fb_alloc_cmap(&info->cmap, 1<<info->var.bits_per_pixel, 0);
}

info->fix.line_length = gx_line_delta(info->var.xres, info->var.bits_per_pixel);

Expand Down Expand Up @@ -331,6 +328,11 @@ static struct fb_info * __init gxfb_init_fbinfo(struct device *dev)

info->var.grayscale = 0;

if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) {
framebuffer_release(info);
return NULL;
}

return info;
}

Expand Down Expand Up @@ -443,8 +445,10 @@ static int __init gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *i
pci_release_region(pdev, 1);
}

if (info)
if (info) {
fb_dealloc_cmap(&info->cmap);
framebuffer_release(info);
}
return ret;
}

Expand All @@ -467,6 +471,7 @@ static void gxfb_remove(struct pci_dev *pdev)
iounmap(par->gp_regs);
pci_release_region(pdev, 1);

fb_dealloc_cmap(&info->cmap);
pci_set_drvdata(pdev, NULL);

framebuffer_release(info);
Expand Down

0 comments on commit a81f3bd

Please sign in to comment.