Commit 4a1b9279 authored by Antonino A. Daplas's avatar Antonino A. Daplas Committed by Linus Torvalds

epson1355fb: color setting fixes

- the pseudo_palette is only 16 elements long
- allocate the pseudo_palette as part of epson1355_par
Signed-off-by: default avatarAntonino Daplas <adaplas@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 75921810
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
struct epson1355_par { struct epson1355_par {
unsigned long reg_addr; unsigned long reg_addr;
u32 pseudo_palette[16];
}; };
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
...@@ -635,7 +636,7 @@ int __init epson1355fb_probe(struct platform_device *dev) ...@@ -635,7 +636,7 @@ int __init epson1355fb_probe(struct platform_device *dev)
goto bail; 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) { if (!info) {
rc = -ENOMEM; rc = -ENOMEM;
goto bail; goto bail;
...@@ -648,7 +649,7 @@ int __init epson1355fb_probe(struct platform_device *dev) ...@@ -648,7 +649,7 @@ int __init epson1355fb_probe(struct platform_device *dev)
rc = -ENOMEM; rc = -ENOMEM;
goto bail; 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); info->screen_base = ioremap(EPSON1355FB_FB_PHYS, EPSON1355FB_FB_LEN);
if (!info->screen_base) { if (!info->screen_base) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment