[rtems commit] bsp/raspberrypi: Move assignment outside if-condition

Joel Sherril joel at rtems.org
Wed Dec 30 00:35:25 UTC 2015


Module:    rtems
Branch:    master
Commit:    4200a36a7556651dfbf7bcdba5b1f9eaa224512d
Changeset: http://git.rtems.org/rtems/commit/?id=4200a36a7556651dfbf7bcdba5b1f9eaa224512d

Author:    Jan Sommer <soja-lists at aries.uberspace.de>
Date:      Wed Dec 30 01:09:34 2015 +0100

bsp/raspberrypi: Move assignment outside if-condition

Assignment was misplaced by one line.

---

 c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c b/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
index 6d9a2cd..9bf90ec 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
+++ b/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
@@ -91,8 +91,8 @@ static int rpi_i2c_bus_transfer(rpi_i2c_bus *bus)
       BCM2835_REG(BCM2835_I2C_C) |= (1 << 9);
 
       /* Sleep until the TX FIFO has free space for a new write. */
+      bus->task_id = rtems_task_self();
       if (
-          bus->task_id = rtems_task_self();
           rtems_event_transient_receive(RTEMS_WAIT, bus->base.timeout) !=
           RTEMS_SUCCESSFUL
       ) {




More information about the vc mailing list