From: Zongdong Jiao Date: Mon, 4 Sep 2017 12:20:03 +0000 (+0800) Subject: hdmitx: fix dead code and bad sizeof X-Git-Tag: khadas-vims-v0.9.6-release~2850 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5c71dff081487afb824c0b6a42c3688de502e10;p=platform%2Fkernel%2Flinux-amlogic.git hdmitx: fix dead code and bad sizeof PD#150078: driver defect clean up: #14 #89 #111 #124 #133 #136 #137 #146 #148 #150 #153 Change-Id: I734a66a8b92a0dc57a232879463a3fc074534fa0 Signed-off-by: Zongdong Jiao --- diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c index eead6cf4..0c90ccb 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_edid.c @@ -198,32 +198,12 @@ void Edid_DecodeStandardTiming(struct hdmitx_info *info, frame_rate = (int)((Data[i*2 + 1]) & 0x3F) + 60; - if ((hor_pixel == 720) && (frame_rate == 30)) - info->hdmi_sup_480i = 1; - else if ((hor_pixel == 720) && (frame_rate == 25)) - info->hdmi_sup_576i = 1; - else if ((hor_pixel == 720) && (frame_rate == 60)) + if ((hor_pixel == 720) && (frame_rate == 60)) info->hdmi_sup_480p = 1; - else if ((hor_pixel == 720) && (frame_rate == 50)) - info->hdmi_sup_576p = 1; else if ((hor_pixel == 1280) && (frame_rate == 60)) info->hdmi_sup_720p_60hz = 1; - else if ((hor_pixel == 1280) && (frame_rate == 50)) - info->hdmi_sup_720p_50hz = 1; - else if ((hor_pixel == 1920) && (frame_rate == 30)) - info->hdmi_sup_1080i_60hz = 1; - else if ((hor_pixel == 1920) && (frame_rate == 25)) - info->hdmi_sup_1080i_50hz = 1; else if ((hor_pixel == 1920) && (frame_rate == 60)) info->hdmi_sup_1080p_60hz = 1; - else if ((hor_pixel == 1920) && (frame_rate == 50)) - info->hdmi_sup_1080p_50hz = 1; - else if ((hor_pixel == 1920) && (frame_rate == 24)) - info->hdmi_sup_1080p_24hz = 1; - else if ((hor_pixel == 1920) && (frame_rate == 25)) - info->hdmi_sup_1080p_25hz = 1; - else if ((hor_pixel == 1920) && (frame_rate == 30)) - info->hdmi_sup_1080p_30hz = 1; } } } @@ -2350,7 +2330,7 @@ static void hdmitx_edid_blk_print(unsigned char *blk, unsigned int blk_idx) if (!tmp_buf) return; - memset(tmp_buf, 0, sizeof(TMP_EDID_BUF_SIZE)); + memset(tmp_buf, 0, TMP_EDID_BUF_SIZE); hdmi_print(INF, EDID "blk%d raw data\n", blk_idx); for (i = 0, pos = 0; i < 128; i++) { pos += sprintf(tmp_buf + pos, "%02x", blk[i]);