summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNam Cao <namcao@linutronix.de>2025-02-05 13:46:32 +0300
committerThomas Gleixner <tglx@linutronix.de>2025-02-18 13:19:07 +0300
commitce68de08a2cc95dc2cb6018a22673beed52f25c3 (patch)
tree7ed4538fa3f08e05f1e7765a72f8a13a938077cd
parentbbdafde7c22018a4a84db98b11eb8f8ab26d7731 (diff)
downloadlinux-ce68de08a2cc95dc2cb6018a22673beed52f25c3.tar.xz
ASoC: fsl: imx-pcm-fiq: 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 <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
-rw-r--r--sound/soc/fsl/imx-pcm-fiq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/fsl/imx-pcm-fiq.c b/sound/soc/fsl/imx-pcm-fiq.c
index 3391430e4253..83de3ae33691 100644
--- a/sound/soc/fsl/imx-pcm-fiq.c
+++ b/sound/soc/fsl/imx-pcm-fiq.c
@@ -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);