summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2011-10-11 18:47:14 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-12 15:51:44 (GMT)
commit19c1e88e02c63008745c8549513e53df4aac868f (patch)
tree0766a7e8b5bfeade0bc697eccab0c40512f6e744
parent54301b5cfe3c16002ab25762a8cd2186beee4a75 (diff)
downloadlinux-fsl-qoriq-19c1e88e02c63008745c8549513e53df4aac868f.tar.xz
staging: xgifb: eliminate global fb_info variable
Move fb_info into xgi_video_info. 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.h3
-rw-r--r--drivers/staging/xgifb/XGI_main_26.c3
-rw-r--r--drivers/staging/xgifb/XGIfb.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/xgifb/XGI_main.h b/drivers/staging/xgifb/XGI_main.h
index 467df83..dacef51 100644
--- a/drivers/staging/xgifb/XGI_main.h
+++ b/drivers/staging/xgifb/XGI_main.h
@@ -125,9 +125,6 @@ MODULE_DEVICE_TABLE(pci, xgifb_pci_table);
/* ------------------- Global Variables ----------------------------- */
-/* Fbcon variables */
-static struct fb_info *fb_info;
-
static struct fb_var_screeninfo default_var = {
.xres = 0,
.yres = 0,
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 6957b65..f7c0afe 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -1986,12 +1986,14 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
u8 CR48, CR38;
int ret;
bool xgi21_drvlcdcaplist = false;
+ struct fb_info *fb_info;
memset(&XGIhw_ext, 0, sizeof(struct xgi_hw_device_info));
fb_info = framebuffer_alloc(sizeof(struct fb_info), &pdev->dev);
if (!fb_info)
return -ENOMEM;
+ xgi_video_info.fb_info = fb_info;
xgi_video_info.chip_id = pdev->device;
pci_read_config_byte(pdev,
PCI_REVISION_ID,
@@ -2447,6 +2449,7 @@ error:
static void __devexit xgifb_remove(struct pci_dev *pdev)
{
struct video_info *xgifb_info = pci_get_drvdata(pdev);
+ struct fb_info *fb_info = xgifb_info->fb_info;
unregister_framebuffer(fb_info);
#ifdef CONFIG_MTRR
diff --git a/drivers/staging/xgifb/XGIfb.h b/drivers/staging/xgifb/XGIfb.h
index f778293..83a1911 100644
--- a/drivers/staging/xgifb/XGIfb.h
+++ b/drivers/staging/xgifb/XGIfb.h
@@ -53,6 +53,8 @@ enum xgi_tv_plug { /* vicki@030226 */
};
struct video_info {
+ struct fb_info *fb_info;
+
int chip_id;
unsigned int video_size;
unsigned long video_base;