diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-03-26 22:54:32 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-03-26 22:54:32 -0400 |
commit | 7f980a06e4a9e3bb26db91da8f0e980b0786023a (patch) | |
tree | 17323d8d952bcf660cd426f09f2b106458509545 | |
parent | 95d517cfce023eb24c5363ab82377146bd659816 (diff) |
viafb: some small cleanup for global variables
We do not need viafb_second{,_virtual}_{xres,yres} outside of
viafbdev.c so move them there and eliminate the virtual ones where
the only sane usage is done during initalization.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
-rw-r--r-- | drivers/video/via/global.c | 4 | ||||
-rw-r--r-- | drivers/video/via/global.h | 2 | ||||
-rw-r--r-- | drivers/video/via/hw.h | 1 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.c | 16 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.h | 2 |
5 files changed, 7 insertions, 18 deletions
diff --git a/drivers/video/via/global.c b/drivers/video/via/global.c index 1ee511b73307..e10d8249534c 100644 --- a/drivers/video/via/global.c +++ b/drivers/video/via/global.c | |||
@@ -40,10 +40,6 @@ int viafb_hotplug_Yres = 480; | |||
40 | int viafb_hotplug_bpp = 32; | 40 | int viafb_hotplug_bpp = 32; |
41 | int viafb_hotplug_refresh = 60; | 41 | int viafb_hotplug_refresh = 60; |
42 | int viafb_primary_dev = None_Device; | 42 | int viafb_primary_dev = None_Device; |
43 | unsigned int viafb_second_xres = 640; | ||
44 | unsigned int viafb_second_yres = 480; | ||
45 | unsigned int viafb_second_virtual_xres; | ||
46 | unsigned int viafb_second_virtual_yres; | ||
47 | int viafb_lcd_panel_id = LCD_PANEL_ID_MAXIMUM + 1; | 43 | int viafb_lcd_panel_id = LCD_PANEL_ID_MAXIMUM + 1; |
48 | struct fb_info *viafbinfo; | 44 | struct fb_info *viafbinfo; |
49 | struct fb_info *viafbinfo1; | 45 | struct fb_info *viafbinfo1; |
diff --git a/drivers/video/via/global.h b/drivers/video/via/global.h index 38ef5ac66953..ff969dc34593 100644 --- a/drivers/video/via/global.h +++ b/drivers/video/via/global.h | |||
@@ -73,8 +73,6 @@ extern int viafb_hotplug_bpp; | |||
73 | extern int viafb_hotplug_refresh; | 73 | extern int viafb_hotplug_refresh; |
74 | extern int viafb_primary_dev; | 74 | extern int viafb_primary_dev; |
75 | 75 | ||
76 | extern unsigned int viafb_second_xres; | ||
77 | extern unsigned int viafb_second_yres; | ||
78 | extern int viafb_lcd_panel_id; | 76 | extern int viafb_lcd_panel_id; |
79 | 77 | ||
80 | #endif /* __GLOBAL_H__ */ | 78 | #endif /* __GLOBAL_H__ */ |
diff --git a/drivers/video/via/hw.h b/drivers/video/via/hw.h index 8858593405aa..090d167863a4 100644 --- a/drivers/video/via/hw.h +++ b/drivers/video/via/hw.h | |||
@@ -910,7 +910,6 @@ struct via_device_mapping { | |||
910 | const char *name; | 910 | const char *name; |
911 | }; | 911 | }; |
912 | 912 | ||
913 | extern unsigned int viafb_second_virtual_xres; | ||
914 | extern int viafb_SAMM_ON; | 913 | extern int viafb_SAMM_ON; |
915 | extern int viafb_dual_fb; | 914 | extern int viafb_dual_fb; |
916 | extern int viafb_LCD2_ON; | 915 | extern int viafb_LCD2_ON; |
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index ed9bd7978cc0..eace9a4257f4 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
@@ -37,6 +37,8 @@ static char *viafb_mode1; | |||
37 | static int viafb_bpp = 32; | 37 | static int viafb_bpp = 32; |
38 | static int viafb_bpp1 = 32; | 38 | static int viafb_bpp1 = 32; |
39 | 39 | ||
40 | static unsigned int viafb_second_xres = 640; | ||
41 | static unsigned int viafb_second_yres = 480; | ||
40 | static unsigned int viafb_second_offset; | 42 | static unsigned int viafb_second_offset; |
41 | static int viafb_second_size; | 43 | static int viafb_second_size; |
42 | 44 | ||
@@ -440,8 +442,8 @@ static int viafb_ioctl(struct fb_info *info, u_int cmd, u_long arg) | |||
440 | if (viafb_SAMM_ON == 1) { | 442 | if (viafb_SAMM_ON == 1) { |
441 | u.viamode.xres_sec = viafb_second_xres; | 443 | u.viamode.xres_sec = viafb_second_xres; |
442 | u.viamode.yres_sec = viafb_second_yres; | 444 | u.viamode.yres_sec = viafb_second_yres; |
443 | u.viamode.virtual_xres_sec = viafb_second_virtual_xres; | 445 | u.viamode.virtual_xres_sec = viafb_dual_fb ? viafbinfo1->var.xres_virtual : viafbinfo->var.xres_virtual; |
444 | u.viamode.virtual_yres_sec = viafb_second_virtual_yres; | 446 | u.viamode.virtual_yres_sec = viafb_dual_fb ? viafbinfo1->var.yres_virtual : viafbinfo->var.yres_virtual; |
445 | u.viamode.refresh_sec = viafb_refresh1; | 447 | u.viamode.refresh_sec = viafb_refresh1; |
446 | u.viamode.bpp_sec = viafb_bpp1; | 448 | u.viamode.bpp_sec = viafb_bpp1; |
447 | } else { | 449 | } else { |
@@ -1790,14 +1792,10 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev) | |||
1790 | 1792 | ||
1791 | parse_mode(viafb_mode, &default_xres, &default_yres); | 1793 | parse_mode(viafb_mode, &default_xres, &default_yres); |
1792 | vmode_entry = viafb_get_mode(default_xres, default_yres); | 1794 | vmode_entry = viafb_get_mode(default_xres, default_yres); |
1793 | if (viafb_SAMM_ON == 1) { | 1795 | if (viafb_SAMM_ON == 1) |
1794 | parse_mode(viafb_mode1, &viafb_second_xres, | 1796 | parse_mode(viafb_mode1, &viafb_second_xres, |
1795 | &viafb_second_yres); | 1797 | &viafb_second_yres); |
1796 | 1798 | ||
1797 | viafb_second_virtual_xres = viafb_second_xres; | ||
1798 | viafb_second_virtual_yres = viafb_second_yres; | ||
1799 | } | ||
1800 | |||
1801 | default_var.xres = default_xres; | 1799 | default_var.xres = default_xres; |
1802 | default_var.yres = default_yres; | 1800 | default_var.yres = default_yres; |
1803 | default_var.xres_virtual = default_xres; | 1801 | default_var.xres_virtual = default_xres; |
@@ -1841,8 +1839,8 @@ int __devinit via_fb_pci_probe(struct viafb_dev *vdev) | |||
1841 | 1839 | ||
1842 | default_var.xres = viafb_second_xres; | 1840 | default_var.xres = viafb_second_xres; |
1843 | default_var.yres = viafb_second_yres; | 1841 | default_var.yres = viafb_second_yres; |
1844 | default_var.xres_virtual = viafb_second_virtual_xres; | 1842 | default_var.xres_virtual = viafb_second_xres; |
1845 | default_var.yres_virtual = viafb_second_virtual_yres; | 1843 | default_var.yres_virtual = viafb_second_yres; |
1846 | default_var.bits_per_pixel = viafb_bpp1; | 1844 | default_var.bits_per_pixel = viafb_bpp1; |
1847 | viafb_fill_var_timing_info(&default_var, viafb_get_refresh( | 1845 | viafb_fill_var_timing_info(&default_var, viafb_get_refresh( |
1848 | default_var.xres, default_var.yres, viafb_refresh1), | 1846 | default_var.xres, default_var.yres, viafb_refresh1), |
diff --git a/drivers/video/via/viafbdev.h b/drivers/video/via/viafbdev.h index ff60e1ddcffc..59e40d1bd614 100644 --- a/drivers/video/via/viafbdev.h +++ b/drivers/video/via/viafbdev.h | |||
@@ -83,8 +83,6 @@ struct viafb_par { | |||
83 | struct chip_information *chip_info; | 83 | struct chip_information *chip_info; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | extern unsigned int viafb_second_virtual_yres; | ||
87 | extern unsigned int viafb_second_virtual_xres; | ||
88 | extern int viafb_SAMM_ON; | 86 | extern int viafb_SAMM_ON; |
89 | extern int viafb_dual_fb; | 87 | extern int viafb_dual_fb; |
90 | extern int viafb_LCD2_ON; | 88 | extern int viafb_LCD2_ON; |