Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tgafb: actually allocate memory for the pseudo_palette

No memory allocation was done for the pseudo_palette. Allocate one for it.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Acked-by: "Maciej W. Rozycki" <macro@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Antonino A. Daplas and committed by
Linus Torvalds
eb3daa83 9965f5b1

+2 -1
+1 -1
drivers/video/tgafb.c
··· 1634 1634 FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT; 1635 1635 info->fbops = &tgafb_ops; 1636 1636 info->screen_base = par->tga_fb_base; 1637 - info->pseudo_palette = (void *)(par + 1); 1637 + info->pseudo_palette = par->palette; 1638 1638 1639 1639 /* This should give a reasonable default video mode. */ 1640 1640 if (tga_bus_pci) {
+1
include/video/tgafb.h
··· 216 216 u32 pll_freq; /* pixclock in mhz */ 217 217 u32 bits_per_pixel; /* bits per pixel */ 218 218 u32 sync_on_green; /* set if sync is on green */ 219 + u32 palette[16]; 219 220 }; 220 221 221 222