drivers/gpu/drm/radeon/radeon_combios.c: fix warning
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 2 Feb 2010 22:40:29 +0000 (14:40 -0800)
committerDave Airlie <airlied@redhat.com>
Fri, 5 Feb 2010 01:47:14 +0000 (11:47 +1000)
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>
drivers/gpu/drm/radeon/radeon_combios.c

index 579c8920e08144b4f6eea6311e706d0aa921ca5b..e7b19440102efc61f5ca99701840c7b0c0e15573 100644 (file)
@@ -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;