Commit dba77f84 authored by Florian Tobias Schandinat's avatar Florian Tobias Schandinat Committed by Linus Torvalds

viafb: make some variables a bit less global

Move some variables closer to their usage.
Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4bbac05f
...@@ -29,8 +29,6 @@ int viafb_refresh = 60; ...@@ -29,8 +29,6 @@ int viafb_refresh = 60;
int viafb_refresh1 = 60; int viafb_refresh1 = 60;
int viafb_lcd_dsp_method = LCD_EXPANDSION; int viafb_lcd_dsp_method = LCD_EXPANDSION;
int viafb_lcd_mode = LCD_OPENLDI; int viafb_lcd_mode = LCD_OPENLDI;
int viafb_bpp = 32;
int viafb_bpp1 = 32;
int viafb_CRT_ON = 1; int viafb_CRT_ON = 1;
int viafb_DVI_ON; int viafb_DVI_ON;
int viafb_LCD_ON ; int viafb_LCD_ON ;
...@@ -41,8 +39,6 @@ int viafb_hotplug_Xres = 640; ...@@ -41,8 +39,6 @@ int viafb_hotplug_Xres = 640;
int viafb_hotplug_Yres = 480; int viafb_hotplug_Yres = 480;
int viafb_hotplug_bpp = 32; int viafb_hotplug_bpp = 32;
int viafb_hotplug_refresh = 60; int viafb_hotplug_refresh = 60;
unsigned int viafb_second_offset;
int viafb_second_size;
int viafb_primary_dev = None_Device; int viafb_primary_dev = None_Device;
unsigned int viafb_second_xres = 640; unsigned int viafb_second_xres = 640;
unsigned int viafb_second_yres = 480; unsigned int viafb_second_yres = 480;
......
...@@ -67,8 +67,6 @@ extern int viafb_refresh; ...@@ -67,8 +67,6 @@ extern int viafb_refresh;
extern int viafb_refresh1; extern int viafb_refresh1;
extern int viafb_lcd_dsp_method; extern int viafb_lcd_dsp_method;
extern int viafb_lcd_mode; extern int viafb_lcd_mode;
extern int viafb_bpp;
extern int viafb_bpp1;
extern int viafb_CRT_ON; extern int viafb_CRT_ON;
extern int viafb_hotplug_Xres; extern int viafb_hotplug_Xres;
......
...@@ -863,8 +863,6 @@ struct pci_device_id_info { ...@@ -863,8 +863,6 @@ struct pci_device_id_info {
}; };
extern unsigned int viafb_second_virtual_xres; extern unsigned int viafb_second_virtual_xres;
extern unsigned int viafb_second_offset;
extern int viafb_second_size;
extern int viafb_SAMM_ON; extern int viafb_SAMM_ON;
extern int viafb_dual_fb; extern int viafb_dual_fb;
extern int viafb_LCD2_ON; extern int viafb_LCD2_ON;
......
...@@ -26,13 +26,17 @@ ...@@ -26,13 +26,17 @@
#include "global.h" #include "global.h"
static struct fb_var_screeninfo default_var;
static char *viafb_name = "Via"; static char *viafb_name = "Via";
static u32 pseudo_pal[17]; static u32 pseudo_pal[17];
/* video mode */ /* video mode */
static char *viafb_mode; static char *viafb_mode;
static char *viafb_mode1; static char *viafb_mode1;
static int viafb_bpp = 32;
static int viafb_bpp1 = 32;
static unsigned int viafb_second_offset;
static int viafb_second_size;
static int viafb_accel = 1; static int viafb_accel = 1;
...@@ -1849,10 +1853,11 @@ static int __devinit via_pci_probe(struct pci_dev *pdev, ...@@ -1849,10 +1853,11 @@ static int __devinit via_pci_probe(struct pci_dev *pdev,
{ {
u32 default_xres, default_yres; u32 default_xres, default_yres;
struct VideoModeTable *vmode_entry; struct VideoModeTable *vmode_entry;
struct fb_var_screeninfo default_var;
u32 viafb_par_length; u32 viafb_par_length;
DEBUG_MSG(KERN_INFO "VIAFB PCI Probe!!\n"); DEBUG_MSG(KERN_INFO "VIAFB PCI Probe!!\n");
memset(&default_var, 0, sizeof(default_var));
viafb_par_length = ALIGN(sizeof(struct viafb_par), BITS_PER_LONG/8); viafb_par_length = ALIGN(sizeof(struct viafb_par), BITS_PER_LONG/8);
/* Allocate fb_info and ***_par here, also including some other needed /* Allocate fb_info and ***_par here, also including some other needed
......
...@@ -83,8 +83,6 @@ struct viafb_par { ...@@ -83,8 +83,6 @@ struct viafb_par {
extern unsigned int viafb_second_virtual_yres; extern unsigned int viafb_second_virtual_yres;
extern unsigned int viafb_second_virtual_xres; extern unsigned int viafb_second_virtual_xres;
extern unsigned int viafb_second_offset;
extern int viafb_second_size;
extern int viafb_SAMM_ON; extern int viafb_SAMM_ON;
extern int viafb_dual_fb; extern int viafb_dual_fb;
extern int viafb_LCD2_ON; extern int viafb_LCD2_ON;
......
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