diff mbox

[U-Boot,1/3] rockchip: i2c: use named constant when appropriate

Message ID 20160818190842.25094-2-john@metanate.com
State Accepted
Commit 80333fd85c23daa235500ecf675f36efad34851b
Delegated to: Heiko Schocher
Headers show

Commit Message

John Keeping Aug. 18, 2016, 7:08 p.m. UTC
Make it clear that we are using the same value in two adjacent lines.

Signed-off-by: John Keeping <john@metanate.com>
---

 drivers/i2c/rk_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Sept. 6, 2016, 1:03 a.m. UTC | #1
On 18 August 2016 at 13:08, John Keeping <john@metanate.com> wrote:
> Make it clear that we are using the same value in two adjacent lines.
>
> Signed-off-by: John Keeping <john@metanate.com>
> ---
>
>  drivers/i2c/rk_i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c
index 63b1418..2597970 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -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);