From: Zheng Yang Date: Fri, 2 Dec 2016 06:04:44 +0000 (+0800) Subject: video: rockchip: hdmi: fix compile warning X-Git-Tag: firefly_0821_release~632 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7f1c063e91b13c875bb35f1c4b5ce899c1b22e51;p=firefly-linux-kernel-4.4.55.git video: rockchip: hdmi: fix compile warning fix warning: switch condition has boolean value [-Wswitch-bool] Change-Id: I11d7a9fe2a07f6681dacf4a1d800b16497339297 Signed-off-by: Zheng Yang (cherry picked from commit 66f72e45db8d12d4c5049de6c6fb9aae67a30fe6) --- diff --git a/drivers/video/rockchip/hdmi/rockchip-hdmiv2/rockchip_hdmiv2_hw.c b/drivers/video/rockchip/hdmi/rockchip-hdmiv2/rockchip_hdmiv2_hw.c index 39ccf057c72c..81510d6a64e7 100644 --- a/drivers/video/rockchip/hdmi/rockchip-hdmiv2/rockchip_hdmiv2_hw.c +++ b/drivers/video/rockchip/hdmi/rockchip-hdmiv2/rockchip_hdmiv2_hw.c @@ -1352,26 +1352,26 @@ static int rockchip_hdmiv2_video_csc(struct hdmi_dev *hdmi_dev, mode = CSC_RGB_0_255_TO_RGB_16_235_8BIT; csc_scale = 0; } - - switch (vpara->color_output_depth && mode != CSC_BYPASS) { - case 10: - color_depth = COLOR_DEPTH_30BIT; - mode += 1; - break; - case 12: - color_depth = COLOR_DEPTH_36BIT; - mode += 2; - break; - case 16: - color_depth = COLOR_DEPTH_48BIT; - mode += 3; - break; - case 8: - default: - color_depth = COLOR_DEPTH_24BIT; - break; + if (mode != CSC_BYPASS) { + switch (vpara->color_output_depth) { + case 10: + color_depth = COLOR_DEPTH_30BIT; + mode += 1; + break; + case 12: + color_depth = COLOR_DEPTH_36BIT; + mode += 2; + break; + case 16: + color_depth = COLOR_DEPTH_48BIT; + mode += 3; + break; + case 8: + default: + color_depth = COLOR_DEPTH_24BIT; + break; + } } - coeff = coeff_csc[mode]; for (i = 0; i < 24; i++) hdmi_writel(hdmi_dev, CSC_COEF_A1_MSB + i, coeff[i]);