Commit 05680cc0 authored by Mark Brown's avatar Mark Brown

Merge branch 'topic/tasklet-convert' of...

Merge branch 'topic/tasklet-convert' of https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-5.10
parents bc442e47 07da90b0
...@@ -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;
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
#define IT_PKT_HEADER_SIZE_CIP 8 // For 2 CIP header. #define IT_PKT_HEADER_SIZE_CIP 8 // For 2 CIP header.
#define IT_PKT_HEADER_SIZE_NO_CIP 0 // Nothing. #define IT_PKT_HEADER_SIZE_NO_CIP 0 // Nothing.
static void pcm_period_tasklet(unsigned long data); static void pcm_period_tasklet(struct tasklet_struct *t);
/** /**
* amdtp_stream_init - initialize an AMDTP stream structure * amdtp_stream_init - initialize an AMDTP stream structure
...@@ -94,7 +94,7 @@ int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit, ...@@ -94,7 +94,7 @@ int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit,
s->flags = flags; s->flags = flags;
s->context = ERR_PTR(-1); s->context = ERR_PTR(-1);
mutex_init(&s->mutex); mutex_init(&s->mutex);
tasklet_init(&s->period_tasklet, pcm_period_tasklet, (unsigned long)s); tasklet_setup(&s->period_tasklet, pcm_period_tasklet);
s->packet_index = 0; s->packet_index = 0;
init_waitqueue_head(&s->callback_wait); init_waitqueue_head(&s->callback_wait);
...@@ -441,9 +441,9 @@ static void update_pcm_pointers(struct amdtp_stream *s, ...@@ -441,9 +441,9 @@ static void update_pcm_pointers(struct amdtp_stream *s,
} }
} }
static void pcm_period_tasklet(unsigned long data) static void pcm_period_tasklet(struct tasklet_struct *t)
{ {
struct amdtp_stream *s = (void *)data; struct amdtp_stream *s = from_tasklet(s, t, period_tasklet);
struct snd_pcm_substream *pcm = READ_ONCE(s->pcm); struct snd_pcm_substream *pcm = READ_ONCE(s->pcm);
if (pcm) if (pcm)
......
...@@ -921,10 +921,10 @@ static void snd_card_asihpi_timer_function(struct timer_list *t) ...@@ -921,10 +921,10 @@ static void snd_card_asihpi_timer_function(struct timer_list *t)
add_timer(&dpcm->timer); add_timer(&dpcm->timer);
} }
static void snd_card_asihpi_int_task(unsigned long data) static void snd_card_asihpi_int_task(struct tasklet_struct *t)
{ {
struct hpi_adapter *a = (struct hpi_adapter *)data; struct snd_card_asihpi *asihpi = from_tasklet(asihpi, t, t);
struct snd_card_asihpi *asihpi; struct hpi_adapter *a = asihpi->hpi;
WARN_ON(!a || !a->snd_card || !a->snd_card->private_data); WARN_ON(!a || !a->snd_card || !a->snd_card->private_data);
asihpi = (struct snd_card_asihpi *)a->snd_card->private_data; asihpi = (struct snd_card_asihpi *)a->snd_card->private_data;
...@@ -2871,8 +2871,7 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev, ...@@ -2871,8 +2871,7 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev,
if (hpi->interrupt_mode) { if (hpi->interrupt_mode) {
asihpi->pcm_start = snd_card_asihpi_pcm_int_start; asihpi->pcm_start = snd_card_asihpi_pcm_int_start;
asihpi->pcm_stop = snd_card_asihpi_pcm_int_stop; asihpi->pcm_stop = snd_card_asihpi_pcm_int_stop;
tasklet_init(&asihpi->t, snd_card_asihpi_int_task, tasklet_setup(&asihpi->t, snd_card_asihpi_int_task);
(unsigned long)hpi);
hpi->interrupt_callback = snd_card_asihpi_isr; hpi->interrupt_callback = snd_card_asihpi_isr;
} else { } else {
asihpi->pcm_start = snd_card_asihpi_pcm_timer_start; asihpi->pcm_start = snd_card_asihpi_pcm_timer_start;
......
...@@ -1070,9 +1070,9 @@ getmixer(struct cmdif *cif, short num, unsigned short *rval, ...@@ -1070,9 +1070,9 @@ getmixer(struct cmdif *cif, short num, unsigned short *rval,
return 0; return 0;
} }
static void riptide_handleirq(unsigned long dev_id) static void riptide_handleirq(struct tasklet_struct *t)
{ {
struct snd_riptide *chip = (void *)dev_id; struct snd_riptide *chip = from_tasklet(chip, t, riptide_tq);
struct cmdif *cif = chip->cif; struct cmdif *cif = chip->cif;
struct snd_pcm_substream *substream[PLAYBACK_SUBSTREAMS + 1]; struct snd_pcm_substream *substream[PLAYBACK_SUBSTREAMS + 1];
struct snd_pcm_runtime *runtime; struct snd_pcm_runtime *runtime;
...@@ -1843,7 +1843,7 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci, ...@@ -1843,7 +1843,7 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci,
chip->received_irqs = 0; chip->received_irqs = 0;
chip->handled_irqs = 0; chip->handled_irqs = 0;
chip->cif = NULL; chip->cif = NULL;
tasklet_init(&chip->riptide_tq, riptide_handleirq, (unsigned long)chip); tasklet_setup(&chip->riptide_tq, riptide_handleirq);
if ((chip->res_port = if ((chip->res_port =
request_region(chip->port, 64, "RIPTIDE")) == NULL) { request_region(chip->port, 64, "RIPTIDE")) == NULL) {
......
...@@ -3791,9 +3791,9 @@ static int snd_hdsp_set_defaults(struct hdsp *hdsp) ...@@ -3791,9 +3791,9 @@ static int snd_hdsp_set_defaults(struct hdsp *hdsp)
return 0; 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) if (hdsp->midi[0].pending)
snd_hdsp_midi_input_read (&hdsp->midi[0]); snd_hdsp_midi_input_read (&hdsp->midi[0]);
...@@ -5182,7 +5182,7 @@ static int snd_hdsp_create(struct snd_card *card, ...@@ -5182,7 +5182,7 @@ static int snd_hdsp_create(struct snd_card *card,
spin_lock_init(&hdsp->lock); 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); pci_read_config_word(hdsp->pci, PCI_CLASS_REVISION, &hdsp->firmware_rev);
hdsp->firmware_rev &= 0xff; hdsp->firmware_rev &= 0xff;
......
...@@ -2169,9 +2169,9 @@ static int snd_hdspm_create_midi(struct snd_card *card, ...@@ -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; int i = 0;
while (i < hdspm->midiPorts) { while (i < hdspm->midiPorts) {
...@@ -6836,8 +6836,7 @@ static int snd_hdspm_create(struct snd_card *card, ...@@ -6836,8 +6836,7 @@ static int snd_hdspm_create(struct snd_card *card,
} }
tasklet_init(&hdspm->midi_tasklet, tasklet_setup(&hdspm->midi_tasklet, hdspm_midi_tasklet);
hdspm_midi_tasklet, (unsigned long) hdspm);
if (hdspm->io_type != MADIface) { if (hdspm->io_type != MADIface) {
......
...@@ -708,9 +708,9 @@ static void fsl_esai_trigger_stop(struct fsl_esai *esai_priv, bool tx) ...@@ -708,9 +708,9 @@ static void fsl_esai_trigger_stop(struct fsl_esai *esai_priv, bool tx)
ESAI_xFCR_xFR, 0); ESAI_xFCR_xFR, 0);
} }
static void fsl_esai_hw_reset(unsigned long arg) static void fsl_esai_hw_reset(struct tasklet_struct *t)
{ {
struct fsl_esai *esai_priv = (struct fsl_esai *)arg; struct fsl_esai *esai_priv = from_tasklet(esai_priv, t, task);
bool tx = true, rx = false, enabled[2]; bool tx = true, rx = false, enabled[2];
unsigned long lock_flags; unsigned long lock_flags;
u32 tfcr, rfcr; u32 tfcr, rfcr;
...@@ -1070,8 +1070,7 @@ static int fsl_esai_probe(struct platform_device *pdev) ...@@ -1070,8 +1070,7 @@ static int fsl_esai_probe(struct platform_device *pdev)
return ret; return ret;
} }
tasklet_init(&esai_priv->task, fsl_esai_hw_reset, tasklet_setup(&esai_priv->task, fsl_esai_hw_reset);
(unsigned long)esai_priv);
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
......
...@@ -198,9 +198,9 @@ static int siu_pcm_rd_set(struct siu_port *port_info, ...@@ -198,9 +198,9 @@ static int siu_pcm_rd_set(struct siu_port *port_info,
return 0; return 0;
} }
static void siu_io_tasklet(unsigned long data) static void siu_io_tasklet(struct tasklet_struct *t)
{ {
struct siu_stream *siu_stream = (struct siu_stream *)data; struct siu_stream *siu_stream = from_tasklet(siu_stream, t, tasklet);
struct snd_pcm_substream *substream = siu_stream->substream; struct snd_pcm_substream *substream = siu_stream->substream;
struct device *dev = substream->pcm->card->dev; struct device *dev = substream->pcm->card->dev;
struct snd_pcm_runtime *rt = substream->runtime; struct snd_pcm_runtime *rt = substream->runtime;
...@@ -520,10 +520,8 @@ static int siu_pcm_new(struct snd_soc_component *component, ...@@ -520,10 +520,8 @@ static int siu_pcm_new(struct snd_soc_component *component,
(*port_info)->pcm = pcm; (*port_info)->pcm = pcm;
/* IO tasklets */ /* IO tasklets */
tasklet_init(&(*port_info)->playback.tasklet, siu_io_tasklet, tasklet_setup(&(*port_info)->playback.tasklet, siu_io_tasklet);
(unsigned long)&(*port_info)->playback); tasklet_setup(&(*port_info)->capture.tasklet, siu_io_tasklet);
tasklet_init(&(*port_info)->capture.tasklet, siu_io_tasklet,
(unsigned long)&(*port_info)->capture);
} }
dev_info(card->dev, "SuperH SIU driver initialized.\n"); dev_info(card->dev, "SuperH SIU driver initialized.\n");
......
...@@ -134,9 +134,9 @@ txx9aclc_dma_submit(struct txx9aclc_dmadata *dmadata, dma_addr_t buf_dma_addr) ...@@ -134,9 +134,9 @@ txx9aclc_dma_submit(struct txx9aclc_dmadata *dmadata, dma_addr_t buf_dma_addr)
#define NR_DMA_CHAIN 2 #define NR_DMA_CHAIN 2
static void txx9aclc_dma_tasklet(unsigned long data) static void txx9aclc_dma_tasklet(struct tasklet_struct *t)
{ {
struct txx9aclc_dmadata *dmadata = (struct txx9aclc_dmadata *)data; struct txx9aclc_dmadata *dmadata = from_tasklet(dmadata, t, tasklet);
struct dma_chan *chan = dmadata->dma_chan; struct dma_chan *chan = dmadata->dma_chan;
struct dma_async_tx_descriptor *desc; struct dma_async_tx_descriptor *desc;
struct snd_pcm_substream *substream = dmadata->substream; struct snd_pcm_substream *substream = dmadata->substream;
...@@ -352,8 +352,7 @@ static int txx9aclc_dma_init(struct txx9aclc_soc_device *dev, ...@@ -352,8 +352,7 @@ static int txx9aclc_dma_init(struct txx9aclc_soc_device *dev,
"playback" : "capture"); "playback" : "capture");
return -EBUSY; return -EBUSY;
} }
tasklet_init(&dmadata->tasklet, txx9aclc_dma_tasklet, tasklet_setup(&dmadata->tasklet, txx9aclc_dma_tasklet);
(unsigned long)dmadata);
return 0; return 0;
} }
......
...@@ -344,10 +344,9 @@ static void snd_usbmidi_do_output(struct snd_usb_midi_out_endpoint *ep) ...@@ -344,10 +344,9 @@ static void snd_usbmidi_do_output(struct snd_usb_midi_out_endpoint *ep)
spin_unlock_irqrestore(&ep->buffer_lock, flags); spin_unlock_irqrestore(&ep->buffer_lock, flags);
} }
static void snd_usbmidi_out_tasklet(unsigned long data) static void snd_usbmidi_out_tasklet(struct tasklet_struct *t)
{ {
struct snd_usb_midi_out_endpoint *ep = struct snd_usb_midi_out_endpoint *ep = from_tasklet(ep, t, tasklet);
(struct snd_usb_midi_out_endpoint *) data;
snd_usbmidi_do_output(ep); snd_usbmidi_do_output(ep);
} }
...@@ -1441,7 +1440,7 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi *umidi, ...@@ -1441,7 +1440,7 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi *umidi,
} }
spin_lock_init(&ep->buffer_lock); spin_lock_init(&ep->buffer_lock);
tasklet_init(&ep->tasklet, snd_usbmidi_out_tasklet, (unsigned long)ep); tasklet_setup(&ep->tasklet, snd_usbmidi_out_tasklet);
init_waitqueue_head(&ep->drain_wait); init_waitqueue_head(&ep->drain_wait);
for (i = 0; i < 0x10; ++i) for (i = 0; i < 0x10; ++i)
......
...@@ -247,9 +247,9 @@ static inline void add_with_wraparound(struct ua101 *ua, ...@@ -247,9 +247,9 @@ static inline void add_with_wraparound(struct ua101 *ua,
*value -= ua->playback.queue_length; *value -= ua->playback.queue_length;
} }
static void playback_tasklet(unsigned long data) static void playback_tasklet(struct tasklet_struct *t)
{ {
struct ua101 *ua = (void *)data; struct ua101 *ua = from_tasklet(ua, t, playback_tasklet);
unsigned long flags; unsigned long flags;
unsigned int frames; unsigned int frames;
struct ua101_urb *urb; struct ua101_urb *urb;
...@@ -1218,8 +1218,7 @@ static int ua101_probe(struct usb_interface *interface, ...@@ -1218,8 +1218,7 @@ static int ua101_probe(struct usb_interface *interface,
spin_lock_init(&ua->lock); spin_lock_init(&ua->lock);
mutex_init(&ua->mutex); mutex_init(&ua->mutex);
INIT_LIST_HEAD(&ua->ready_playback_urbs); INIT_LIST_HEAD(&ua->ready_playback_urbs);
tasklet_init(&ua->playback_tasklet, tasklet_setup(&ua->playback_tasklet, playback_tasklet);
playback_tasklet, (unsigned long)ua);
init_waitqueue_head(&ua->alsa_capture_wait); init_waitqueue_head(&ua->alsa_capture_wait);
init_waitqueue_head(&ua->rate_feedback_wait); init_waitqueue_head(&ua->rate_feedback_wait);
init_waitqueue_head(&ua->alsa_playback_wait); init_waitqueue_head(&ua->alsa_playback_wait);
......
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