Skip to content

Commit

Permalink
ALSA: core: convert tasklets to use new tasklet_setup() API
Browse files Browse the repository at this point in the history
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: Romain Perier <[email protected]>
Signed-off-by: Allen Pais <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
Allen Pais authored and tiwai committed Sep 2, 2020
1 parent d012a71 commit d1a58aa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sound/core/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,9 +816,9 @@ static void snd_timer_clear_callbacks(struct snd_timer *timer,
* 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;

if (timer->card && timer->card->shutdown) {
Expand Down Expand Up @@ -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->sack_list_head);
spin_lock_init(&timer->lock);
tasklet_init(&timer->task_queue, snd_timer_tasklet,
(unsigned long)timer);
tasklet_setup(&timer->task_queue, snd_timer_tasklet);
timer->max_instances = 1000; /* default limit per timer */
if (card != NULL) {
timer->module = card->module;
Expand Down

0 comments on commit d1a58aa

Please sign in to comment.