Commit d1a58aae authored by Allen Pais's avatar Allen Pais Committed by Takashi Iwai

ALSA: core: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.
Signed-off-by: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200902040221.354941-2-allen.lkml@gmail.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d012a719
...@@ -816,9 +816,9 @@ static void snd_timer_clear_callbacks(struct snd_timer *timer, ...@@ -816,9 +816,9 @@ static void snd_timer_clear_callbacks(struct snd_timer *timer,
* timer tasklet * timer tasklet
* *
*/ */
static void snd_timer_tasklet(unsigned long arg) static void snd_timer_tasklet(struct tasklet_struct *t)
{ {
struct snd_timer *timer = (struct snd_timer *) arg; struct snd_timer *timer = from_tasklet(timer, t, task_queue);
unsigned long flags; unsigned long flags;
if (timer->card && timer->card->shutdown) { if (timer->card && timer->card->shutdown) {
...@@ -967,8 +967,7 @@ int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid, ...@@ -967,8 +967,7 @@ int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid,
INIT_LIST_HEAD(&timer->ack_list_head); INIT_LIST_HEAD(&timer->ack_list_head);
INIT_LIST_HEAD(&timer->sack_list_head); INIT_LIST_HEAD(&timer->sack_list_head);
spin_lock_init(&timer->lock); spin_lock_init(&timer->lock);
tasklet_init(&timer->task_queue, snd_timer_tasklet, tasklet_setup(&timer->task_queue, snd_timer_tasklet);
(unsigned long)timer);
timer->max_instances = 1000; /* default limit per timer */ timer->max_instances = 1000; /* default limit per timer */
if (card != NULL) { if (card != NULL) {
timer->module = card->module; timer->module = card->module;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment