Skip to content

Commit

Permalink
ALSA: hdsp: 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 c208239 commit 1a1575a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions sound/pci/rme9652/hdsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3791,9 +3791,9 @@ static int snd_hdsp_set_defaults(struct hdsp *hdsp)
return 0;
}

static void hdsp_midi_tasklet(unsigned long arg)
static void hdsp_midi_tasklet(struct tasklet_struct *t)
{
struct hdsp *hdsp = (struct hdsp *)arg;
struct hdsp *hdsp = from_tasklet(hdsp, t, midi_tasklet);

if (hdsp->midi[0].pending)
snd_hdsp_midi_input_read (&hdsp->midi[0]);
Expand Down Expand Up @@ -5182,7 +5182,7 @@ static int snd_hdsp_create(struct snd_card *card,

spin_lock_init(&hdsp->lock);

tasklet_init(&hdsp->midi_tasklet, hdsp_midi_tasklet, (unsigned long)hdsp);
tasklet_setup(&hdsp->midi_tasklet, hdsp_midi_tasklet);

pci_read_config_word(hdsp->pci, PCI_CLASS_REVISION, &hdsp->firmware_rev);
hdsp->firmware_rev &= 0xff;
Expand Down
7 changes: 3 additions & 4 deletions sound/pci/rme9652/hdspm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2169,9 +2169,9 @@ static int snd_hdspm_create_midi(struct snd_card *card,
}


static void hdspm_midi_tasklet(unsigned long arg)
static void hdspm_midi_tasklet(struct tasklet_struct *t)
{
struct hdspm *hdspm = (struct hdspm *)arg;
struct hdspm *hdspm = from_tasklet(hdspm, t, midi_tasklet);
int i = 0;

while (i < hdspm->midiPorts) {
Expand Down Expand Up @@ -6836,8 +6836,7 @@ static int snd_hdspm_create(struct snd_card *card,

}

tasklet_init(&hdspm->midi_tasklet,
hdspm_midi_tasklet, (unsigned long) hdspm);
tasklet_setup(&hdspm->midi_tasklet, hdspm_midi_tasklet);


if (hdspm->io_type != MADIface) {
Expand Down

0 comments on commit 1a1575a

Please sign in to comment.