Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131279
b: refs/heads/master
c: 35887b1
h: refs/heads/master
i:
  131277: 24663c0
  131275: 91d899b
  131271: b74d1ac
  131263: 2ba13b7
v: v3
  • Loading branch information
Andres Salomon authored and Linus Torvalds committed Feb 11, 2009
1 parent a81f3bd commit 0a9953c
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: b14caecdbe7730bf82c8510f1ba52e00273e15c4
refs/heads/master: 35887b1cf74dc751dd0574b26515142d3cea9376
17 changes: 11 additions & 6 deletions trunk/drivers/video/geode/gx1fb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,10 @@ static int gx1fb_set_par(struct fb_info *info)
{
struct geodefb_par *par = info->par;

if (info->var.bits_per_pixel == 16) {
if (info->var.bits_per_pixel == 16)
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 = gx1_line_delta(info->var.xres, info->var.bits_per_pixel);

Expand Down Expand Up @@ -315,6 +312,10 @@ static struct fb_info * __init gx1fb_init_fbinfo(struct device *dev)
if (!par->panel_x)
par->enable_crt = 1; /* fall back to CRT if no panel is specified */

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

Expand Down Expand Up @@ -374,8 +375,11 @@ static int __init gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id *
release_mem_region(gx1_gx_base() + 0x8300, 0x100);
}

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

return ret;
}

Expand All @@ -395,6 +399,7 @@ static void gx1fb_remove(struct pci_dev *pdev)
iounmap(par->dc_regs);
release_mem_region(gx1_gx_base() + 0x8300, 0x100);

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

framebuffer_release(info);
Expand Down

0 comments on commit 0a9953c

Please sign in to comment.