Skip to content

Commit ce556c2

Browse files
Yuesong LiAndi Shyti
authored andcommitted
i2c: lpi2c: convert to use secs_to_jiffies()
Since secs_to_jiffies() has been introduced in commit b35108a ("jiffies: Define secs_to_jiffies()"), we can use it to avoid scaling the time to msec. Signed-off-by: Yuesong Li <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a9320f3 commit ce556c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-imx-lpi2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ static int lpi2c_imx_dma_timeout_calculate(struct lpi2c_imx_struct *lpi2c_imx)
563563
time += 1;
564564

565565
/* Double calculated time */
566-
return msecs_to_jiffies(time * MSEC_PER_SEC);
566+
return secs_to_jiffies(time);
567567
}
568568

569569
static int lpi2c_imx_alloc_rx_cmd_buf(struct lpi2c_imx_struct *lpi2c_imx)

0 commit comments

Comments
 (0)