Skip to content

Commit

Permalink
epson1355fb: color setting fixes
Browse files Browse the repository at this point in the history
- the pseudo_palette is only 16 elements long
- allocate the pseudo_palette as part of epson1355_par

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Jul 17, 2007
1 parent 7592181 commit 4a1b927
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/video/epson1355fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

struct epson1355_par {
unsigned long reg_addr;
u32 pseudo_palette[16];
};

/* ------------------------------------------------------------------------- */
Expand Down Expand Up @@ -635,7 +636,7 @@ int __init epson1355fb_probe(struct platform_device *dev)
goto bail;
}

info = framebuffer_alloc(sizeof(struct epson1355_par) + sizeof(u32) * 256, &dev->dev);
info = framebuffer_alloc(sizeof(struct epson1355_par), &dev->dev);
if (!info) {
rc = -ENOMEM;
goto bail;
Expand All @@ -648,7 +649,7 @@ int __init epson1355fb_probe(struct platform_device *dev)
rc = -ENOMEM;
goto bail;
}
info->pseudo_palette = (void *)(default_par + 1);
info->pseudo_palette = default_par->pseudo_palette;

info->screen_base = ioremap(EPSON1355FB_FB_PHYS, EPSON1355FB_FB_LEN);
if (!info->screen_base) {
Expand Down

0 comments on commit 4a1b927

Please sign in to comment.