]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
i2c: lpi2c: convert to use secs_to_jiffies()
authorYuesong Li <liyuesong@vivo.com>
Fri, 13 Jun 2025 11:06:38 +0000 (19:06 +0800)
committerAndi Shyti <andi.shyti@linux.intel.com>
Fri, 25 Jul 2025 21:15:39 +0000 (23:15 +0200)
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 <liyuesong@vivo.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250613110649.3283336-1-liyuesong@vivo.com
drivers/i2c/busses/i2c-imx-lpi2c.c

index 064bc83840a6256b31d21a629b4ce20219cd5988..717b617dbc2cbc0edc142807fd75dbf02e39231f 100644 (file)
@@ -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)