From b8391de6395382eeca6059bd79828a9ff3aa2a0a Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Fri, 29 Dec 2017 11:34:46 +0900 Subject: [PATCH] i2c: sprd: remove build warnings Remove build warnings in sprd i2c. Change-Id: I377ebe847191dac9aab922e1e9b36c0840bd8b0e Signed-off-by: Seung-Woo Kim --- drivers/i2c/i2c_hal.c | 2 +- drivers/i2c/sprd_i2c.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/i2c_hal.c b/drivers/i2c/i2c_hal.c index 9119ceb..d3b3f0e 100644 --- a/drivers/i2c/i2c_hal.c +++ b/drivers/i2c/i2c_hal.c @@ -139,12 +139,12 @@ LOCAL uint32 I2C_Bus_Init (uint32 logic_id, uint32 freq, uint32 port_id) *********************************************************************************************************/ LOCAL uint32 I2C_Bus_Exit (uint32 bus_id) { - uint32 status_val = 0; __i2c_bus[bus_id].reference = 0; /* if (NULL != __i2c_bus[bus_id].mutex) { + uint32 status_val = 0; status_val = SCI_DeleteMutex (__i2c_bus[bus_id].mutex); //SCI_PASSERT((0 != status_val),("I2C delete MUTEX fail!")); __i2c_bus[bus_id].mutex = NULL; diff --git a/drivers/i2c/sprd_i2c.c b/drivers/i2c/sprd_i2c.c index 66ad72b..3bb2be8 100644 --- a/drivers/i2c/sprd_i2c.c +++ b/drivers/i2c/sprd_i2c.c @@ -280,7 +280,7 @@ PUBLIC ERR_I2C_E I2C_Init(uint32 freq) // Note: // None /*********************************************************************/ -PUBLIC uint32 I2C_GetSCLclk() +PUBLIC uint32 I2C_GetSCLclk(void) { uint32 APB_clk,i2c_dvd,freq; @@ -467,7 +467,6 @@ PUBLIC ERR_I2C_E I2C_ReadCmd(uint8 addr,uint8 *pCmd, BOOLEAN ack_en) volatile uint32 timetick = 0; PUBLIC ERR_I2C_E I2C_WriteCmdArr(uint8 addr, uint8 *pCmd, uint32 len, BOOLEAN ack_en) { - volatile uint32 curtime = 0; volatile uint32 i = 0; volatile uint32 cmd = 0; volatile I2C_CTL_REG_T * ptr = (volatile I2C_CTL_REG_T *)I2C_BASE; -- 2.7.4