aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/hrtimer.c
diff options
context:
space:
mode:
authorNam Cao <[email protected]>2025-02-05 10:46:33 +0000
committerTakashi Iwai <[email protected]>2025-02-10 08:26:31 +0000
commit70e90680c2592c38c62e5716f1296a2d74bae7af (patch)
treed3271317e03f0dce0c12ea171183ad5efc5776f1 /sound/core/hrtimer.c
parentALSA: hda: hda-intel: add Panther Lake-H support (diff)
downloadkernel-70e90680c2592c38c62e5716f1296a2d74bae7af.tar.gz
kernel-70e90680c2592c38c62e5716f1296a2d74bae7af.zip
ALSA: 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. Acked-by: Zack Rusin <[email protected]> Signed-off-by: Nam Cao <[email protected]> Cc: Takashi Iwai <[email protected]> Link: https://patch.msgid.link/598031332ce738c82286a158cb66eb7e735b2e79.1738746904.git.namcao@linutronix.de Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'sound/core/hrtimer.c')
-rw-r--r--sound/core/hrtimer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/core/hrtimer.c b/sound/core/hrtimer.c
index 147c1fea4708..e9c60dce59fb 100644
--- a/sound/core/hrtimer.c
+++ b/sound/core/hrtimer.c
@@ -66,9 +66,8 @@ static int snd_hrtimer_open(struct snd_timer *t)
stime = kzalloc(sizeof(*stime), GFP_KERNEL);
if (!stime)
return -ENOMEM;
- hrtimer_init(&stime->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
stime->timer = t;
- stime->hrt.function = snd_hrtimer_callback;
+ hrtimer_setup(&stime->hrt, snd_hrtimer_callback, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
t->private_data = stime;
return 0;
}