Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175817
b: refs/heads/master
c: ceae8cb
h: refs/heads/master
i:
  175815: 3d90768
v: v3
  • Loading branch information
Dave Airlie authored and Benjamin Herrenschmidt committed Dec 9, 2009
1 parent 87ee054 commit 7b4c1ad
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 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: 88358ab08944da726e948d216977ad499dfc15c6
refs/heads/master: ceae8cbe94f3127253110e2d01b9334069e93177
15 changes: 14 additions & 1 deletion trunk/drivers/video/offb.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,17 @@ static int offb_set_par(struct fb_info *info)
return 0;
}

static void offb_destroy(struct fb_info *info)
{
if (info->screen_base)
iounmap(info->screen_base);
release_mem_region(info->aperture_base, info->aperture_size);
framebuffer_release(info);
}

static struct fb_ops offb_ops = {
.owner = THIS_MODULE,
.fb_destroy = offb_destroy,
.fb_setcolreg = offb_setcolreg,
.fb_set_par = offb_set_par,
.fb_blank = offb_blank,
Expand Down Expand Up @@ -482,10 +491,14 @@ static void __init offb_init_fb(const char *name, const char *full_name,
var->sync = 0;
var->vmode = FB_VMODE_NONINTERLACED;

/* set offb aperture size for generic probing */
info->aperture_base = address;
info->aperture_size = fix->smem_len;

info->fbops = &offb_ops;
info->screen_base = ioremap(address, fix->smem_len);
info->pseudo_palette = (void *) (info + 1);
info->flags = FBINFO_DEFAULT | foreign_endian;
info->flags = FBINFO_DEFAULT | FBINFO_MISC_FIRMWARE | foreign_endian;

fb_alloc_cmap(&info->cmap, 256, 0);

Expand Down

0 comments on commit 7b4c1ad

Please sign in to comment.