]> git.sur5r.net Git - u-boot/commitdiff
rockchip: i2c: use named constant when appropriate
authorJohn Keeping <john@metanate.com>
Thu, 18 Aug 2016 19:08:40 +0000 (20:08 +0100)
committerHeiko Schocher <hs@denx.de>
Tue, 13 Sep 2016 04:57:05 +0000 (06:57 +0200)
Make it clear that we are using the same value in two adjacent lines.

Signed-off-by: John Keeping <john@metanate.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/i2c/rk_i2c.c

index 63b141838b6f14be71e0d38c708681d043ac6276..2597970bb00b68abb2a99cb173658e4fe5e10ffc 100644 (file)
@@ -258,7 +258,7 @@ static int rk_i2c_write(struct rk_i2c *i2c, uchar chip, uint reg, uint r_len,
 
        while (bytes_remain_len) {
                if (bytes_remain_len > RK_I2C_FIFO_SIZE)
-                       bytes_xferred = 32;
+                       bytes_xferred = RK_I2C_FIFO_SIZE;
                else
                        bytes_xferred = bytes_remain_len;
                words_xferred = DIV_ROUND_UP(bytes_xferred, 4);