From: Nam Cao Date: Wed, 5 Feb 2025 10:39:10 +0000 (+0100) Subject: ata: pata_octeon_cf: Switch to use hrtimer_setup() X-Git-Tag: v6.15-rc1~203^2~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32539b780c4fc3641a37ad9cb6134d72b5c8cae9;p=thirdparty%2Fkernel%2Flinux.git ata: pata_octeon_cf: 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 Signed-off-by: Thomas Gleixner Acked-by: Damien Le Moal Link: https://lore.kernel.org/all/a36ae1e4be26f8359bf2777b1813bbf4d7a7983f.1738746821.git.namcao@linutronix.de --- diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c index dce24806a0529..2d32125c16fd4 100644 --- a/drivers/ata/pata_octeon_cf.c +++ b/drivers/ata/pata_octeon_cf.c @@ -935,9 +935,8 @@ static int octeon_cf_probe(struct platform_device *pdev) ap->mwdma_mask = enable_dma ? ATA_MWDMA4 : 0; /* True IDE mode needs a timer to poll for not-busy. */ - hrtimer_init(&cf_port->delayed_finish, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - cf_port->delayed_finish.function = octeon_cf_delayed_finish; + hrtimer_setup(&cf_port->delayed_finish, octeon_cf_delayed_finish, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); } else { /* 16 bit but not True IDE */ base = cs0 + 0x800;