Searched hist:"059 fce9f61fd81ab67555b9ba87e12cc4b8db8f6" (Results 1 – 1 of 1) sorted by relevance
| /rk3399_rockchip-uboot/drivers/i2c/ |
| H A D | mvtwsi.c | 059fce9f61fd81ab67555b9ba87e12cc4b8db8f6 Thu Jul 21 09:57:05 UTC 2016 mario.six@gdsys.cc <mario.six@gdsys.cc> 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>
|