ALSA: hdsp: 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: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <allen.lkml@gmail.com> Link: https://lore.kernel.org/r/20200902040221.354941-6-allen.lkml@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
c2082393d5
commit
1a1575a151
|
@ -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]);
|
||||
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue