summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2011-10-11 18:47:24 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-12 15:51:46 (GMT)
commit76cabaa42800ac3dd3d64e60fa3a18c1dfcbf791 (patch)
tree969aee67e86ab8bfd4e13d4e27c26b997f83616c
parent5aa55d9f97c63bbf53977e10154e2714e03586b2 (diff)
downloadlinux-fsl-qoriq-76cabaa42800ac3dd3d64e60fa3a18c1dfcbf791.tar.xz
staging: xgifb: move pseudo_palette into xgifb_video_info
pseudo_palette should be dynamically allocated for each fb. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/xgifb/XGI_main.h2
-rw-r--r--drivers/staging/xgifb/XGI_main_26.c2
-rw-r--r--drivers/staging/xgifb/XGIfb.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/xgifb/XGI_main.h b/drivers/staging/xgifb/XGI_main.h
index 896cf14..e584f0b 100644
--- a/drivers/staging/xgifb/XGI_main.h
+++ b/drivers/staging/xgifb/XGI_main.h
@@ -160,8 +160,6 @@ static struct fb_fix_screeninfo XGIfb_fix = {
.xpanstep = 1,
.ypanstep = 1,
};
-static u32 pseudo_palette[17];
-
/* display status */
static int XGIfb_crt1off;
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index e89299c..45427d7 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -2390,7 +2390,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
fb_info->screen_base = xgifb_info->video_vbase;
fb_info->fbops = &XGIfb_ops;
XGIfb_get_fix(&fb_info->fix, -1, fb_info);
- fb_info->pseudo_palette = pseudo_palette;
+ fb_info->pseudo_palette = xgifb_info->pseudo_palette;
fb_alloc_cmap(&fb_info->cmap, 256 , 0);
diff --git a/drivers/staging/xgifb/XGIfb.h b/drivers/staging/xgifb/XGIfb.h
index 46b696f..efcfac8 100644
--- a/drivers/staging/xgifb/XGIfb.h
+++ b/drivers/staging/xgifb/XGIfb.h
@@ -61,6 +61,8 @@ struct xgifb_video_info {
int mode_idx;
int rate_idx;
+ u32 pseudo_palette[17];
+
int chip_id;
unsigned int video_size;
unsigned long video_base;