Skip to contentSkip to conversation

tgafb: Actually allocate memory for the pseudo_palette

PATCH In review Antonino A. Daplas 2 participants 2 messages Jun 2, 2007 – Jun 4, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 16/24 tgafb: Actually allocate memory for the pseudo_palette

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

---

 drivers/video/tgafb.c |    2 +-
 include/video/tgafb.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
drivers/video/tgafb.c +1 -1
index f0fde6e..5c9cd6e 100644
@@ -1635,7 +1635,7 @@ tgafb_register(struct device *dev)
 		      FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT;
 	info->fbops = &tgafb_ops;
 	info->screen_base = par->tga_fb_base;
-	info->pseudo_palette = (void *)(par + 1);
+	info->pseudo_palette = par->palette;
 
 	/* This should give a reasonable default video mode.  */
 	if (tga_bus_pci) {
include/video/tgafb.h +1 -0
index 03d0dbe..7bc5e2c 100644
@@ -216,6 +216,7 @@ struct tga_par {
 	u32 pll_freq;			/* pixclock in mhz */
 	u32 bits_per_pixel;		/* bits per pixel */
 	u32 sync_on_green;		/* set if sync is on green */
+	u32 palette[16];
 };
 
 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

#1 lore raw
Quoted 1 line · Antonino A. Daplas

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

Indeed. Thanks for debugging -- looks like a leftover from an earlier
version of the changes I made which got forgotten later on.

Maciej

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/