Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60901
b: refs/heads/master
c: c771eba
h: refs/heads/master
i:
  60899: 4c4004f
v: v3
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Jul 17, 2007
1 parent d2e2e92 commit b332732
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 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: 4a1b92793a0824d31f165fe3a97634dbb9a3ae18
refs/heads/master: c771eba1fe7168d6f2cbc52efa55b3838bd05b05
16 changes: 9 additions & 7 deletions trunk/drivers/video/fm2fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,15 @@ static int fm2fb_blank(int blank, struct fb_info *info)
static int fm2fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
u_int transp, struct fb_info *info)
{
if (regno > info->cmap.len)
return 1;
red >>= 8;
green >>= 8;
blue >>= 8;
if (regno < 16) {
red >>= 8;
green >>= 8;
blue >>= 8;

((u32*)(info->pseudo_palette))[regno] = (red << 16) |
(green << 8) | blue;
}

((u32*)(info->pseudo_palette))[regno] = (red << 16) | (green << 8) | blue;
return 0;
}

Expand Down Expand Up @@ -237,7 +239,7 @@ static int __devinit fm2fb_probe(struct zorro_dev *z,
if (!zorro_request_device(z,"fm2fb"))
return -ENXIO;

info = framebuffer_alloc(256 * sizeof(u32), &z->dev);
info = framebuffer_alloc(16 * sizeof(u32), &z->dev);
if (!info) {
zorro_release_device(z);
return -ENOMEM;
Expand Down

0 comments on commit b332732

Please sign in to comment.