Commit 19c1e88e authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: xgifb: eliminate global fb_info variable

Move fb_info into xgi_video_info.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 54301b5c
...@@ -125,9 +125,6 @@ MODULE_DEVICE_TABLE(pci, xgifb_pci_table); ...@@ -125,9 +125,6 @@ MODULE_DEVICE_TABLE(pci, xgifb_pci_table);
/* ------------------- Global Variables ----------------------------- */ /* ------------------- Global Variables ----------------------------- */
/* Fbcon variables */
static struct fb_info *fb_info;
static struct fb_var_screeninfo default_var = { static struct fb_var_screeninfo default_var = {
.xres = 0, .xres = 0,
.yres = 0, .yres = 0,
......
...@@ -1986,12 +1986,14 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -1986,12 +1986,14 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
u8 CR48, CR38; u8 CR48, CR38;
int ret; int ret;
bool xgi21_drvlcdcaplist = false; bool xgi21_drvlcdcaplist = false;
struct fb_info *fb_info;
memset(&XGIhw_ext, 0, sizeof(struct xgi_hw_device_info)); memset(&XGIhw_ext, 0, sizeof(struct xgi_hw_device_info));
fb_info = framebuffer_alloc(sizeof(struct fb_info), &pdev->dev); fb_info = framebuffer_alloc(sizeof(struct fb_info), &pdev->dev);
if (!fb_info) if (!fb_info)
return -ENOMEM; return -ENOMEM;
xgi_video_info.fb_info = fb_info;
xgi_video_info.chip_id = pdev->device; xgi_video_info.chip_id = pdev->device;
pci_read_config_byte(pdev, pci_read_config_byte(pdev,
PCI_REVISION_ID, PCI_REVISION_ID,
...@@ -2447,6 +2449,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -2447,6 +2449,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
static void __devexit xgifb_remove(struct pci_dev *pdev) static void __devexit xgifb_remove(struct pci_dev *pdev)
{ {
struct video_info *xgifb_info = pci_get_drvdata(pdev); struct video_info *xgifb_info = pci_get_drvdata(pdev);
struct fb_info *fb_info = xgifb_info->fb_info;
unregister_framebuffer(fb_info); unregister_framebuffer(fb_info);
#ifdef CONFIG_MTRR #ifdef CONFIG_MTRR
......
...@@ -53,6 +53,8 @@ enum xgi_tv_plug { /* vicki@030226 */ ...@@ -53,6 +53,8 @@ enum xgi_tv_plug { /* vicki@030226 */
}; };
struct video_info { struct video_info {
struct fb_info *fb_info;
int chip_id; int chip_id;
unsigned int video_size; unsigned int video_size;
unsigned long video_base; unsigned long video_base;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment