From b1b20728b9d8298804092e0e52899e98972f225e Mon Sep 17 00:00:00 2001 From: yxj Date: Sat, 14 Jun 2014 15:45:28 +0800 Subject: [PATCH] dp anx6345, dp rk32:fix warining --- .../video/rockchip/transmitter/dp_anx6345.c | 8 +++---- drivers/video/rockchip/transmitter/rk32_dp.c | 22 ++++++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/drivers/video/rockchip/transmitter/dp_anx6345.c b/drivers/video/rockchip/transmitter/dp_anx6345.c index 7da6493044ce..7fd0071822af 100644 --- a/drivers/video/rockchip/transmitter/dp_anx6345.c +++ b/drivers/video/rockchip/transmitter/dp_anx6345.c @@ -176,7 +176,7 @@ static int get_dp_chip_id(struct i2c_client *client) return (id<<8)|c1; } - +#if defined(BIST_MODE) static int anx980x_bist_mode(struct i2c_client *client) { char val,i; @@ -364,7 +364,7 @@ static int anx980x_bist_mode(struct i2c_client *client) return 0; } - +#endif static int anx980x_aux_rst(struct i2c_client *client) { char val; @@ -625,7 +625,7 @@ static int anx980x_init(struct i2c_client *client) return 0; } - +#if defined(BIST_MODE) static int anx6345_bist_mode(struct i2c_client *client) { struct edp_anx6345 *anx6345 = i2c_get_clientdata(client); @@ -684,7 +684,7 @@ static int anx6345_bist_mode(struct i2c_client *client) return 0; } - +#endif int anx6345_start_aux_transaction(struct i2c_client *client) { diff --git a/drivers/video/rockchip/transmitter/rk32_dp.c b/drivers/video/rockchip/transmitter/rk32_dp.c index 83310b2bc3bf..51461f1af80b 100644 --- a/drivers/video/rockchip/transmitter/rk32_dp.c +++ b/drivers/video/rockchip/transmitter/rk32_dp.c @@ -38,7 +38,7 @@ #endif /*#define EDP_BIST_MODE*/ - +/*#define SW_LT*/ static struct rk32_edp *rk32_edp; static int rk32_edp_clk_enable(struct rk32_edp *edp) @@ -110,6 +110,7 @@ static int rk32_edp_init_edp(struct rk32_edp *edp) return 0; } +#if 0 static int rk32_edp_detect_hpd(struct rk32_edp *edp) { int timeout_loop = 0; @@ -129,7 +130,7 @@ static int rk32_edp_detect_hpd(struct rk32_edp *edp) return 0; } - +#endif static int rk32_edp_read_edid(struct rk32_edp *edp) { unsigned char edid[EDID_LENGTH * 2]; @@ -252,6 +253,7 @@ static int rk32_edp_read_edid(struct rk32_edp *edp) return 0; } +#if 0 static int rk32_edp_handle_edid(struct rk32_edp *edp) { u8 buf[12]; @@ -275,6 +277,7 @@ static int rk32_edp_handle_edid(struct rk32_edp *edp) return retval; } + static int rk32_edp_enable_rx_to_enhanced_mode(struct rk32_edp *edp, bool enable) { @@ -316,6 +319,7 @@ void rk32_edp_rx_control(struct rk32_edp *edp, bool enable) }*/ } + static int rk32_edp_is_enhanced_mode_available(struct rk32_edp *edp) { u8 data; @@ -329,6 +333,7 @@ static int rk32_edp_is_enhanced_mode_available(struct rk32_edp *edp) return DPCD_ENHANCED_FRAME_CAP(data); } + static void rk32_edp_disable_rx_zmux(struct rk32_edp *edp) { /*rk32_edp_write_byte_to_dpcd(edp, @@ -357,7 +362,9 @@ static int rk32_edp_set_enhanced_mode(struct rk32_edp *edp) return 0; } +#endif +#if defined(SW_LT) static int rk32_edp_training_pattern_dis(struct rk32_edp *edp) { int retval; @@ -832,7 +839,7 @@ reduce_link_rate: rk32_edp_reduce_link_rate(edp); return -EIO; } - +#endif static int rk32_edp_get_max_rx_bandwidth(struct rk32_edp *edp, u8 *bandwidth) { @@ -916,6 +923,7 @@ static int rk32_edp_init_training(struct rk32_edp *edp) return 0; } +#if defined(SW_LT) static int rk32_edp_sw_link_training(struct rk32_edp *edp) { int retval = 0; @@ -952,7 +960,7 @@ static int rk32_edp_sw_link_training(struct rk32_edp *edp) return retval; } - +#else static int rk32_edp_hw_link_training(struct rk32_edp *edp) { u32 cnt = 50; @@ -977,6 +985,8 @@ static int rk32_edp_hw_link_training(struct rk32_edp *edp) return val; } +#endif + static int rk32_edp_set_link_train(struct rk32_edp *edp) { int retval; @@ -984,7 +994,7 @@ static int rk32_edp_set_link_train(struct rk32_edp *edp) retval = rk32_edp_init_training(edp); if (retval < 0) dev_err(edp->dev, "DP LT init failed!\n"); -#if 0 +#if defined(SW_LT) retval = rk32_edp_sw_link_training(edp); #else retval = rk32_edp_hw_link_training(edp); @@ -1065,6 +1075,7 @@ static int rk32_edp_config_video(struct rk32_edp *edp, return retval; } +#if 0 static int rk32_edp_enable_scramble(struct rk32_edp *edp, bool enable) { u8 data; @@ -1102,6 +1113,7 @@ static int rk32_edp_enable_scramble(struct rk32_edp *edp, bool enable) return 0; } +#endif static irqreturn_t rk32_edp_isr(int irq, void *arg) { -- 2.34.1