From: Yuesong Li Date: Fri, 13 Jun 2025 11:06:38 +0000 (+0800) Subject: i2c: lpi2c: convert to use secs_to_jiffies() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce556c29b0a2974f344aadf37708956b43c11141;p=thirdparty%2Fkernel%2Fstable.git i2c: lpi2c: convert to use secs_to_jiffies() Since secs_to_jiffies() has been introduced in commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()"), we can use it to avoid scaling the time to msec. Signed-off-by: Yuesong Li Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250613110649.3283336-1-liyuesong@vivo.com --- diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c index 064bc83840a6..717b617dbc2c 100644 --- a/drivers/i2c/busses/i2c-imx-lpi2c.c +++ b/drivers/i2c/busses/i2c-imx-lpi2c.c @@ -563,7 +563,7 @@ static int lpi2c_imx_dma_timeout_calculate(struct lpi2c_imx_struct *lpi2c_imx) time += 1; /* Double calculated time */ - return msecs_to_jiffies(time * MSEC_PER_SEC); + return secs_to_jiffies(time); } static int lpi2c_imx_alloc_rx_cmd_buf(struct lpi2c_imx_struct *lpi2c_imx)