MLK-20451-2: hdmi rx: Fix incorrect type of function return variable
authorSandor Yu <Sandor.yu@nxp.com>
Fri, 23 Nov 2018 06:40:16 +0000 (14:40 +0800)
committerSandor Yu <Sandor.yu@nxp.com>
Fri, 19 Apr 2019 02:40:50 +0000 (10:40 +0800)
Fix incorrect function return variable type.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
drivers/media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.c
drivers/media/platform/imx8/hdmi/API_AFE_ss28fdsoi_hdmirx.h
drivers/media/platform/imx8/hdmi/mxc-hdmi-hw.c

index 7961b6a..e09a64e 100644 (file)
@@ -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,
index 14992f6..f4a06d2 100644 (file)
@@ -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);
 
index a7f64b3..3fef1f1 100644 (file)
@@ -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);