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

Joel Sherrill joel at rtems.org
Wed Dec 30 00:36:40 UTC 2015


Thanks. I suspected that was the issue but wouldn't have
dared changed the code without asking. :)

Hopefully you are enjoying your holidays.

--joel

On Tue, Dec 29, 2015 at 6:09 PM, Jan Sommer <soja-lists at aries.uberspace.de>
wrote:

> 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
>        ) {
> --
> 2.5.0
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20151229/0a715d1b/attachment-0002.html>


More information about the devel mailing list