[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <173987439135.10177.15569548246627518878.tip-bot2@tip-bot2>
Date: Tue, 18 Feb 2025 10:26:31 -0000
From: "tip-bot2 for Nam Cao" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Nam Cao <namcao@...utronix.de>, Thomas Gleixner <tglx@...utronix.de>,
Zack Rusin <zack.rusin@...adcom.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: timers/cleanups] i2c: Switch to use hrtimer_setup()
The following commit has been merged into the timers/cleanups branch of tip:
Commit-ID: f1061c1442c1eddd71a25fe86516ee346ff4b7aa
Gitweb: https://git.kernel.org/tip/f1061c1442c1eddd71a25fe86516ee346ff4b7aa
Author: Nam Cao <namcao@...utronix.de>
AuthorDate: Wed, 05 Feb 2025 11:46:16 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Tue, 18 Feb 2025 11:19:05 +01:00
i2c: Switch to use hrtimer_setup()
hrtimer_setup() takes the callback function pointer as argument and
initializes the timer completely.
Replace hrtimer_init() and the open coded initialization of
hrtimer::function with the new setup mechanism.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@...utronix.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Zack Rusin <zack.rusin@...adcom.com>
Link: https://lore.kernel.org/all/6a0d31244560b76cc7e76954bf68dbe14a4761e3.1738746904.git.namcao@linutronix.de
---
drivers/i2c/busses/i2c-imx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index ee0d25b..9e5d454 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -1723,8 +1723,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
return -ENOMEM;
spin_lock_init(&i2c_imx->slave_lock);
- hrtimer_init(&i2c_imx->slave_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
- i2c_imx->slave_timer.function = i2c_imx_slave_timeout;
+ hrtimer_setup(&i2c_imx->slave_timer, i2c_imx_slave_timeout, CLOCK_MONOTONIC,
+ HRTIMER_MODE_ABS);
match = device_get_match_data(&pdev->dev);
if (match)
Powered by blists - more mailing lists