From 313611244fde85734b5e30379e8dc50673894ae7 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Mon, 28 Apr 2008 02:14:53 -0700 Subject: [PATCH] --- yaml --- r: 94140 b: refs/heads/master c: 22af89aa0c0b4012a7431114a340efd3665a7617 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/video/console/fbcon.h | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 5e146aa52d7a..233f5df4f511 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2ae09f0da1cd0c8c646edea2e68356e76789461c +refs/heads/master: 22af89aa0c0b4012a7431114a340efd3665a7617 diff --git a/trunk/drivers/video/console/fbcon.h b/trunk/drivers/video/console/fbcon.h index 3706307e70ed..0135e0395456 100644 --- a/trunk/drivers/video/console/fbcon.h +++ b/trunk/drivers/video/console/fbcon.h @@ -104,10 +104,14 @@ struct fbcon_ops { #define attr_blink(s) \ ((s) & 0x8000) -#define mono_col(info) \ - (~(0xfff << (max((info)->var.green.length, \ - max((info)->var.red.length, \ - (info)->var.blue.length)))) & 0xff) + +static inline int mono_col(const struct fb_info *info) +{ + __u32 max_len; + max_len = max(info->var.green.length, info->var.red.length); + max_len = max(info->var.blue.length, max_len); + return ~(0xfff << (max_len & 0xff)); +} static inline int attr_col_ec(int shift, struct vc_data *vc, struct fb_info *info, int is_fg)