From: Antonino A. Daplas Date: Tue, 17 Jul 2007 11:05:36 +0000 (-0700) Subject: epson1355fb: color setting fixes X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4a1b92793a0824d31f165fe3a97634dbb9a3ae18;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git epson1355fb: color setting fixes - the pseudo_palette is only 16 elements long - allocate the pseudo_palette as part of epson1355_par Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/epson1355fb.c b/drivers/video/epson1355fb.c index ca2c54ce508e..67f58bae384d 100644 --- a/drivers/video/epson1355fb.c +++ b/drivers/video/epson1355fb.c @@ -63,6 +63,7 @@ struct epson1355_par { unsigned long reg_addr; + u32 pseudo_palette[16]; }; /* ------------------------------------------------------------------------- */ @@ -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; @@ -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) {