From 876207a58bd82c3781bfedc74320fff28270230c Mon Sep 17 00:00:00 2001 From: Sandor Yu Date: Fri, 23 Nov 2018 14:40:16 +0800 Subject: [PATCH] MLK-20451-2: hdmi rx: Fix incorrect type of function return variable Fix incorrect function return variable type. Signed-off-by: Sandor Yu --- .../media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.c | 8 ++++---- .../media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.h | 8 ++++---- drivers/media/platform/imx8/hdmi/mxc-hdmi-hw.c | 6 ++++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.c b/drivers/media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.c index 7961b6a9acf8..e09a64e5f5dc 100644 --- a/drivers/media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.c +++ b/drivers/media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.c @@ -158,7 +158,7 @@ void pre_data_rate_change(state_struct *state) msleep(20); } -u8 pma_cmn_ready(state_struct *state) +int pma_cmn_ready(state_struct *state) { u32 i; @@ -172,7 +172,7 @@ u8 pma_cmn_ready(state_struct *state) return 0; } -u8 pma_rx_clk_signal_detect(state_struct *state) +int pma_rx_clk_signal_detect(state_struct *state) { u32 i; @@ -186,7 +186,7 @@ u8 pma_rx_clk_signal_detect(state_struct *state) return 0; } -u32 pma_rx_clk_freq_detect(state_struct *state) +int pma_rx_clk_freq_detect(state_struct *state) { u16 reg_val; u32 rx_clk_freq; @@ -219,7 +219,7 @@ u32 pma_rx_clk_freq_detect(state_struct *state) return rx_clk_freq; } -u8 pma_pll_config(state_struct *state, +int pma_pll_config(state_struct *state, u32 rx_clk_freq, clk_ratio_t clk_ratio, tmds_bit_clock_ratio_t tmds_bit_clk_ratio, diff --git a/drivers/media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.h b/drivers/media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.h index 14992f650f7f..f4a06d2bcc37 100644 --- a/drivers/media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.h +++ b/drivers/media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.h @@ -131,11 +131,11 @@ typedef enum { void speedup_config(state_struct *state); void arc_config(state_struct *state); void pma_config(state_struct *state); -u8 pma_cmn_ready(state_struct *state); -u8 pma_rx_clk_signal_detect(state_struct *state); -u32 pma_rx_clk_freq_detect(state_struct *state); +int pma_cmn_ready(state_struct *state); +int pma_rx_clk_signal_detect(state_struct *state); +int pma_rx_clk_freq_detect(state_struct *state); void pre_data_rate_change(state_struct *state); -u8 pma_pll_config(state_struct *state, u32, clk_ratio_t, tmds_bit_clock_ratio_t, unsigned char); +int pma_pll_config(state_struct *state, u32, clk_ratio_t, tmds_bit_clock_ratio_t, unsigned char); clk_ratio_t clk_ratio_detect(state_struct *state, u32, u32, u8, pixel_encoding_t, tmds_bit_clock_ratio_t); void phy_status(state_struct *state); diff --git a/drivers/media/platform/imx8/hdmi/mxc-hdmi-hw.c b/drivers/media/platform/imx8/hdmi/mxc-hdmi-hw.c index a7f64b322a3b..3fef1f146248 100644 --- a/drivers/media/platform/imx8/hdmi/mxc-hdmi-hw.c +++ b/drivers/media/platform/imx8/hdmi/mxc-hdmi-hw.c @@ -300,8 +300,10 @@ int hdmirx_init(state_struct *state) /* Check if the firmware is running */ ret = CDN_API_CheckAlive_blocking(state); - if (ret < 0) - return ret; + if (ret != 0) { + DRM_ERROR("NO HDMI RX FW running\n"); + return -ENXIO; + } /* Set driver and firmware active */ CDN_API_MainControl_blocking(state, 1, &sts); -- 2.17.1