]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: fsl: imx-pcm-fiq: Switch to use hrtimer_setup()
authorNam Cao <namcao@linutronix.de>
Wed, 5 Feb 2025 10:46:32 +0000 (11:46 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 18 Feb 2025 10:19:07 +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/ed4be9ec380a688291e3fc9b24f8c38a3f07a143.1738746904.git.namcao@linutronix.de
sound/soc/fsl/imx-pcm-fiq.c

index 3391430e425327bd09ff1a5cc175fd5c6a7e9b58..83de3ae336910500b7da5c74c2686e2ea26e1fdd 100644 (file)
@@ -185,8 +185,7 @@ static int snd_imx_open(struct snd_soc_component *component,
 
        atomic_set(&iprtd->playing, 0);
        atomic_set(&iprtd->capturing, 0);
-       hrtimer_init(&iprtd->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
-       iprtd->hrt.function = snd_hrtimer_callback;
+       hrtimer_setup(&iprtd->hrt, snd_hrtimer_callback, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
 
        ret = snd_pcm_hw_constraint_integer(substream->runtime,
                        SNDRV_PCM_HW_PARAM_PERIODS);