From: Nam Cao Date: Wed, 5 Feb 2025 10:46:09 +0000 (+0100) Subject: mmc: dw_mmc: Switch to use hrtimer_setup() X-Git-Tag: v6.15-rc1~203^2~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3a1ed018e9950f49232600fd0d96d460e07874f9;p=thirdparty%2Fkernel%2Flinux.git mmc: dw_mmc: 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: Zack Rusin Link: https://lore.kernel.org/all/4dec579387ced5e97bb25739fad2ac852e5a689c.1738746904.git.namcao@linutronix.de --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 3cbda98d08d28..31f40c04afda5 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -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)