Commit 0f2395c6 authored by Florian Tobias Schandinat's avatar Florian Tobias Schandinat Committed by James Toy

Clean the duoview handling up by replacing the varible with the funtion in

the only place where it is used.  This is a code cleanup only, no runtime
change expected.
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>
parent 8767944f
...@@ -1009,7 +1009,8 @@ static int viafb_cursor(struct fb_info *info, struct fb_cursor *cursor) ...@@ -1009,7 +1009,8 @@ static int viafb_cursor(struct fb_info *info, struct fb_cursor *cursor)
return -ENODEV; return -ENODEV;
/* When duoview and using lcd , use soft cursor */ /* When duoview and using lcd , use soft cursor */
if (viafb_LCD_ON || ((struct viafb_par *)(info->par))->duoview) if (viafb_LCD_ON || (!viafb_SAMM_ON &&
viafb_LCD2_ON + viafb_DVI_ON + viafb_CRT_ON == 2))
return -ENODEV; return -ENODEV;
viafb_show_hw_cursor(info, HW_Cursor_OFF); viafb_show_hw_cursor(info, HW_Cursor_OFF);
...@@ -1379,18 +1380,6 @@ static int get_primary_device(void) ...@@ -1379,18 +1380,6 @@ static int get_primary_device(void)
return primary_device; return primary_device;
} }
static u8 is_duoview(void)
{
if (0 == viafb_SAMM_ON) {
if (viafb_LCD_ON + viafb_LCD2_ON +
viafb_DVI_ON + viafb_CRT_ON == 2)
return true;
return false;
} else {
return false;
}
}
static void apply_second_mode_setting(struct fb_var_screeninfo static void apply_second_mode_setting(struct fb_var_screeninfo
*sec_var) *sec_var)
{ {
...@@ -1499,8 +1488,6 @@ static int apply_device_setting(struct viafb_ioctl_setting setting_info, ...@@ -1499,8 +1488,6 @@ static int apply_device_setting(struct viafb_ioctl_setting setting_info,
need_set_mode = 1; need_set_mode = 1;
} }
viaparinfo->duoview = is_duoview();
if (!need_set_mode) { if (!need_set_mode) {
; ;
} else { } else {
...@@ -1621,7 +1608,6 @@ static void parse_active_dev(void) ...@@ -1621,7 +1608,6 @@ static void parse_active_dev(void)
viafb_CRT_ON = STATE_ON; viafb_CRT_ON = STATE_ON;
viafb_SAMM_ON = STATE_OFF; viafb_SAMM_ON = STATE_OFF;
} }
viaparinfo->duoview = is_duoview();
} }
static void parse_video_dev(void) static void parse_video_dev(void)
......
...@@ -52,7 +52,6 @@ struct viafb_par { ...@@ -52,7 +52,6 @@ struct viafb_par {
u32 VQ_end; /* Virtual Queue End Address */ u32 VQ_end; /* Virtual Queue End Address */
u32 iga_path; u32 iga_path;
struct proc_dir_entry *proc_entry; /*viafb proc entry */ struct proc_dir_entry *proc_entry; /*viafb proc entry */
u8 duoview; /*Is working in duoview mode? */
/* I2C stuff */ /* I2C stuff */
struct via_i2c_stuff i2c_stuff; struct via_i2c_stuff i2c_stuff;
......
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