Skip to content

Commit

Permalink
ASoC: fsl: imx-pcm-fiq: Switch to use hrtimer_setup()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Nam Cao authored and Thomas Gleixner committed Feb 18, 2025
1 parent bbdafde commit ce68de0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/fsl/imx-pcm-fiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ce68de0

Please sign in to comment.