mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-28 15:53:06 +08:00
bsps/powerpc/gen5200/i2c/i2c.c: Fix enum conversion warnings
The GCC warning -Wenum-conversion flagged the function i2c_transfer_wait_sema() which was treated as returning a mix of rtems_status_code and i2c_message_status. Changed to return an rtems_status_code uniformly.
This commit is contained in:
committed by
Gedare Bloom
parent
f7116eee20
commit
f1a5c225fe
@@ -58,7 +58,7 @@ i2c_transfer_poll_done_func(void *arg)
|
||||
* RTEMS_SUCCESSFUL, if tranfer finished successfully,
|
||||
* or RTEMS status code if semaphore operations has failed.
|
||||
*/
|
||||
static i2c_message_status
|
||||
static rtems_status_code
|
||||
i2c_transfer_wait_sema(i2c_bus_number bus, i2c_message *msg, int nmsg)
|
||||
{
|
||||
rtems_status_code sc;
|
||||
@@ -72,7 +72,7 @@ i2c_transfer_wait_sema(i2c_bus_number bus, i2c_message *msg, int nmsg)
|
||||
&sema
|
||||
);
|
||||
if (sc != RTEMS_SUCCESSFUL)
|
||||
return I2C_RESOURCE_NOT_AVAILABLE;
|
||||
return RTEMS_UNSATISFIED;
|
||||
sc = i2c_transfer(bus, nmsg, msg,
|
||||
i2c_transfer_sema_done_func, &sema);
|
||||
if (sc != RTEMS_SUCCESSFUL)
|
||||
|
||||
Reference in New Issue
Block a user