@@ -288,12 +288,12 @@ static bool fbcon_skip_panic(struct fb_info *info)
288
288
#endif
289
289
}
290
290
291
- static inline int fbcon_is_inactive (struct vc_data * vc , struct fb_info * info )
291
+ static inline int fbcon_is_active (struct vc_data * vc , struct fb_info * info )
292
292
{
293
293
struct fbcon_ops * ops = info -> fbcon_par ;
294
294
295
- return ( info -> state != FBINFO_STATE_RUNNING ||
296
- vc -> vc_mode != KD_TEXT || ops -> graphics || fbcon_skip_panic (info ) );
295
+ return info -> state == FBINFO_STATE_RUNNING &&
296
+ vc -> vc_mode == KD_TEXT && ! ops -> graphics && ! fbcon_skip_panic (info );
297
297
}
298
298
299
299
static int get_color (struct vc_data * vc , struct fb_info * info ,
@@ -1266,7 +1266,7 @@ static void __fbcon_clear(struct vc_data *vc, unsigned int sy, unsigned int sx,
1266
1266
struct fbcon_display * p = & fb_display [vc -> vc_num ];
1267
1267
u_int y_break ;
1268
1268
1269
- if (fbcon_is_inactive (vc , info ))
1269
+ if (! fbcon_is_active (vc , info ))
1270
1270
return ;
1271
1271
1272
1272
if (!height || !width )
@@ -1310,7 +1310,7 @@ static void fbcon_putcs(struct vc_data *vc, const u16 *s, unsigned int count,
1310
1310
struct fbcon_display * p = & fb_display [vc -> vc_num ];
1311
1311
struct fbcon_ops * ops = info -> fbcon_par ;
1312
1312
1313
- if (! fbcon_is_inactive (vc , info ))
1313
+ if (fbcon_is_active (vc , info ))
1314
1314
ops -> putcs (vc , info , s , count , real_y (p , ypos ), xpos ,
1315
1315
get_color (vc , info , scr_readw (s ), 1 ),
1316
1316
get_color (vc , info , scr_readw (s ), 0 ));
@@ -1321,7 +1321,7 @@ static void fbcon_clear_margins(struct vc_data *vc, int bottom_only)
1321
1321
struct fb_info * info = fbcon_info_from_console (vc -> vc_num );
1322
1322
struct fbcon_ops * ops = info -> fbcon_par ;
1323
1323
1324
- if (! fbcon_is_inactive (vc , info ))
1324
+ if (fbcon_is_active (vc , info ))
1325
1325
ops -> clear_margins (vc , info , margin_color , bottom_only );
1326
1326
}
1327
1327
@@ -1333,7 +1333,7 @@ static void fbcon_cursor(struct vc_data *vc, bool enable)
1333
1333
1334
1334
ops -> cur_blink_jiffies = msecs_to_jiffies (vc -> vc_cur_blink_ms );
1335
1335
1336
- if (fbcon_is_inactive (vc , info ) || vc -> vc_deccm != 1 )
1336
+ if (! fbcon_is_active (vc , info ) || vc -> vc_deccm != 1 )
1337
1337
return ;
1338
1338
1339
1339
if (vc -> vc_cursor_type & CUR_SW )
@@ -1739,7 +1739,7 @@ static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx,
1739
1739
struct fb_info * info = fbcon_info_from_console (vc -> vc_num );
1740
1740
struct fbcon_display * p = & fb_display [vc -> vc_num ];
1741
1741
1742
- if (fbcon_is_inactive (vc , info ))
1742
+ if (! fbcon_is_active (vc , info ))
1743
1743
return ;
1744
1744
1745
1745
if (!width || !height )
@@ -1763,7 +1763,7 @@ static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b,
1763
1763
struct fbcon_display * p = & fb_display [vc -> vc_num ];
1764
1764
int scroll_partial = info -> flags & FBINFO_PARTIAL_PAN_OK ;
1765
1765
1766
- if (fbcon_is_inactive (vc , info ))
1766
+ if (! fbcon_is_active (vc , info ))
1767
1767
return true;
1768
1768
1769
1769
fbcon_cursor (vc , false);
@@ -2147,7 +2147,7 @@ static bool fbcon_switch(struct vc_data *vc)
2147
2147
fbcon_del_cursor_work (old_info );
2148
2148
}
2149
2149
2150
- if (fbcon_is_inactive (vc , info ) ||
2150
+ if (! fbcon_is_active (vc , info ) ||
2151
2151
ops -> blank_state != FB_BLANK_UNBLANK )
2152
2152
fbcon_del_cursor_work (info );
2153
2153
else
@@ -2187,7 +2187,7 @@ static bool fbcon_switch(struct vc_data *vc)
2187
2187
scrollback_max = 0 ;
2188
2188
scrollback_current = 0 ;
2189
2189
2190
- if (! fbcon_is_inactive (vc , info )) {
2190
+ if (fbcon_is_active (vc , info )) {
2191
2191
ops -> var .xoffset = ops -> var .yoffset = p -> yscroll = 0 ;
2192
2192
ops -> update_start (info );
2193
2193
}
@@ -2243,7 +2243,7 @@ static bool fbcon_blank(struct vc_data *vc, enum vesa_blank_mode blank,
2243
2243
}
2244
2244
}
2245
2245
2246
- if (! fbcon_is_inactive (vc , info )) {
2246
+ if (fbcon_is_active (vc , info )) {
2247
2247
if (ops -> blank_state != blank ) {
2248
2248
ops -> blank_state = blank ;
2249
2249
fbcon_cursor (vc , !blank );
@@ -2257,7 +2257,7 @@ static bool fbcon_blank(struct vc_data *vc, enum vesa_blank_mode blank,
2257
2257
update_screen (vc );
2258
2258
}
2259
2259
2260
- if (mode_switch || fbcon_is_inactive (vc , info ) ||
2260
+ if (mode_switch || ! fbcon_is_active (vc , info ) ||
2261
2261
ops -> blank_state != FB_BLANK_UNBLANK )
2262
2262
fbcon_del_cursor_work (info );
2263
2263
else
@@ -2587,7 +2587,7 @@ static void fbcon_set_palette(struct vc_data *vc, const unsigned char *table)
2587
2587
int i , j , k , depth ;
2588
2588
u8 val ;
2589
2589
2590
- if (fbcon_is_inactive (vc , info ))
2590
+ if (! fbcon_is_active (vc , info ))
2591
2591
return ;
2592
2592
2593
2593
if (!con_is_visible (vc ))
@@ -2687,7 +2687,7 @@ static void fbcon_modechanged(struct fb_info *info)
2687
2687
scrollback_max = 0 ;
2688
2688
scrollback_current = 0 ;
2689
2689
2690
- if (! fbcon_is_inactive (vc , info )) {
2690
+ if (fbcon_is_active (vc , info )) {
2691
2691
ops -> var .xoffset = ops -> var .yoffset = p -> yscroll = 0 ;
2692
2692
ops -> update_start (info );
2693
2693
}
0 commit comments