staging: xgifb: eliminate XGIfb_fix
authorAaro Koskinen <aaro.koskinen@iki.fi>
Tue, 11 Oct 2011 18:47:27 +0000 (21:47 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 Oct 2011 15:51:47 +0000 (09:51 -0600)
Eliminate XGIfb_fix and initialize needed fields of fb_info->fix
in probe().

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>
drivers/staging/xgifb/XGI_main.h
drivers/staging/xgifb/XGI_main_26.c

index 0d439e9..1d0949c 100644 (file)
@@ -125,13 +125,6 @@ MODULE_DEVICE_TABLE(pci, xgifb_pci_table);
 
 /* ------------------- Global Variables ----------------------------- */
 
-static struct fb_fix_screeninfo XGIfb_fix = {
-       .id             = "XGI",
-       .type           = FB_TYPE_PACKED_PIXELS,
-       .xpanstep       = 1,
-       .ypanstep       = 1,
-};
-
 /* display status */
 static int XGIfb_crt1off;
 static int XGIfb_forcecrt1 = -1;
index 5eed802..ba7f096 100644 (file)
@@ -2390,8 +2390,12 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
 
        }
 
+       strncpy(fb_info->fix.id, "XGI", sizeof(fb_info->fix.id) - 1);
+       fb_info->fix.type       = FB_TYPE_PACKED_PIXELS;
+       fb_info->fix.xpanstep   = 1;
+       fb_info->fix.ypanstep   = 1;
+
        fb_info->flags = FBINFO_FLAG_DEFAULT;
-       fb_info->fix = XGIfb_fix;
        fb_info->screen_base = xgifb_info->video_vbase;
        fb_info->fbops = &XGIfb_ops;
        XGIfb_get_fix(&fb_info->fix, -1, fb_info);