diff options
author | mario.six@gdsys.cc <mario.six@gdsys.cc> | 2016-07-21 11:57:05 +0200 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2016-07-26 10:19:35 +0200 |
commit | 059fce9f61fd81ab67555b9ba87e12cc4b8db8f6 (patch) | |
tree | b3ff2e03cde622610336b8d47d20c28c9e6f3dc7 /Licenses | |
parent | 670514f52479cd1e0ae7952f45fef5779719aef2 (diff) | |
download | u-boot-imx-059fce9f61fd81ab67555b9ba87e12cc4b8db8f6.zip u-boot-imx-059fce9f61fd81ab67555b9ba87e12cc4b8db8f6.tar.gz u-boot-imx-059fce9f61fd81ab67555b9ba87e12cc4b8db8f6.tar.bz2 |
i2c: mvtwsi: Get rid of status parameter
The twsi_stop function contains a parameter "status," which is used to
pass in the current exit status of the function calling twsi_stop, and
either return this status unchanged if it indicates an error, or return
twsi_stop's exit status if it does not indicate an error.
While not massively complicated, this adds another purpose to the
twsi_stop function, which should have the sole purpose of asserting a
STOP condition on the bus (and not manage the exit status of its
caller).
Therefore, we move the exit status management into the caller functions
by introducing a "stop_status" variable and returning either the status
before the twsi_stop call (kept in the "status" variable), or the status
from the twsi_stop call, depending on which indicates an error.
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'Licenses')
0 files changed, 0 insertions, 0 deletions