diff options
author | Patrice Chotard | 2017-10-17 11:21:33 +0200 |
---|---|---|
committer | Heiko Schocher | 2017-10-17 11:28:41 +0200 |
commit | d10bd6cfd85c2a9f27c950e22e83d27ff978e7e8 (patch) | |
tree | f8c29db10a7c6b668ac8276c0598dce1b59b4fbe | |
parent | 81c484376353251ba13b7ea987a15a896b3d106a (diff) |
i2c: stm32f7_i2c: fix usage of useless local variable
Remove useless local variable "s" and use directly
function's parameter "output"
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
-rw-r--r-- | drivers/i2c/stm32f7_i2c.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c index 346748d4331..86624878e2e 100644 --- a/drivers/i2c/stm32f7_i2c.c +++ b/drivers/i2c/stm32f7_i2c.c @@ -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, |