提交 d10bd6cf 编写于 作者: P Patrice Chotard 提交者: Heiko Schocher

i2c: stm32f7_i2c: fix usage of useless local variable

Remove useless local variable "s" and use directly
function's parameter "output"
Signed-off-by: NPatrice Chotard <patrice.chotard@st.com>
上级 81c48437
......@@ -640,7 +640,7 @@ static int stm32_i2c_compute_timing(struct stm32_i2c_priv *i2c_priv,
struct stm32_i2c_setup *setup,
struct stm32_i2c_timings *output)
{
struct stm32_i2c_timings *v, *_v, s;
struct stm32_i2c_timings *v, *_v;
struct list_head solutions;
int ret;
......@@ -676,16 +676,10 @@ static int stm32_i2c_compute_timing(struct stm32_i2c_priv *i2c_priv,
if (ret)
goto exit;
ret = stm32_i2c_choose_solution(setup, &solutions, &s);
ret = stm32_i2c_choose_solution(setup, &solutions, output);
if (ret)
goto exit;
output->presc = s.presc;
output->scldel = s.scldel;
output->sdadel = s.sdadel;
output->scll = s.scll;
output->sclh = s.sclh;
debug("%s: Presc: %i, scldel: %i, sdadel: %i, scll: %i, sclh: %i\n",
__func__, output->presc,
output->scldel, output->sdadel,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册