Skip to content

Commit f1061c1

Browse files
covanamKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Zack Rusin <[email protected]> Link: https://lore.kernel.org/all/6a0d31244560b76cc7e76954bf68dbe14a4761e3.1738746904.git.namcao@linutronix.de
1 parent c69da17 commit f1061c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/i2c/busses/i2c-imx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,8 +1723,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
17231723
return -ENOMEM;
17241724

17251725
spin_lock_init(&i2c_imx->slave_lock);
1726-
hrtimer_init(&i2c_imx->slave_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
1727-
i2c_imx->slave_timer.function = i2c_imx_slave_timeout;
1726+
hrtimer_setup(&i2c_imx->slave_timer, i2c_imx_slave_timeout, CLOCK_MONOTONIC,
1727+
HRTIMER_MODE_ABS);
17281728

17291729
match = device_get_match_data(&pdev->dev);
17301730
if (match)

0 commit comments

Comments
 (0)