]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mmc: dw_mmc: Switch to use hrtimer_setup()
authorNam Cao <namcao@linutronix.de>
Wed, 5 Feb 2025 10:46:09 +0000 (11:46 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 18 Feb 2025 10:19:04 +0000 (11:19 +0100)
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@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://lore.kernel.org/all/4dec579387ced5e97bb25739fad2ac852e5a689c.1738746904.git.namcao@linutronix.de
drivers/mmc/host/dw_mmc.c

index 3cbda98d08d28722d16ba2e855342249ac878ad3..31f40c04afda51561951c40d6a2b2f9345d7ddf2 100644 (file)
@@ -1875,8 +1875,7 @@ static void dw_mci_init_fault(struct dw_mci *host)
 {
        host->fail_data_crc = (struct fault_attr) FAULT_ATTR_INITIALIZER;
 
-       hrtimer_init(&host->fault_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
-       host->fault_timer.function = dw_mci_fault_timer;
+       hrtimer_setup(&host->fault_timer, dw_mci_fault_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
 }
 #else
 static void dw_mci_init_fault(struct dw_mci *host)