summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2010-02-02 14:40:29 -0800
committerDave Airlie <airlied@redhat.com>2010-02-05 11:47:14 +1000
commit94cf6434a1bc5958d5da3be62f1272792dada2bf (patch)
treeec938473a864964f73fd52c50d94b0f0ee941520
parentd7748bacbbee80b2cc4b690a74d5db2cd84acd7b (diff)
downloadlinux-94cf6434a1bc5958d5da3be62f1272792dada2bf.tar.gz
linux-94cf6434a1bc5958d5da3be62f1272792dada2bf.tar.bz2
linux-94cf6434a1bc5958d5da3be62f1272792dada2bf.zip
drivers/gpu/drm/radeon/radeon_combios.c: fix warning
drivers/gpu/drm/radeon/radeon_combios.c: In function 'radeon_combios_get_lvds_info': drivers/gpu/drm/radeon/radeon_combios.c:893: warning: comparison is always false due to limited range of data type Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_combios.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 579c8920e081..e7b19440102e 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -971,8 +971,7 @@ struct radeon_encoder_lvds *radeon_combios_get_lvds_info(struct radeon_encoder
lvds->native_mode.vdisplay);
lvds->panel_vcc_delay = RBIOS16(lcd_info + 0x2c);
- if (lvds->panel_vcc_delay > 2000 || lvds->panel_vcc_delay < 0)
- lvds->panel_vcc_delay = 2000;
+ lvds->panel_vcc_delay = min_t(u16, lvds->panel_vcc_delay, 2000);
lvds->panel_pwr_delay = RBIOS8(lcd_info + 0x24);
lvds->panel_digon_delay = RBIOS16(lcd_info + 0x38) & 0xf;