diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 08:34:29 -0700 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-10-24 21:01:16 +0200 |
commit | bc47ba90b01afe468cdd586b0dbe59b64862e2b7 (patch) | |
tree | 67919e97c5af07a8c1467218ea7640e51dd24ce8 /sound/drivers/mtpav.c | |
parent | 1a0190157521704c11f8650756388b62f3887eb3 (diff) | |
download | lwn-bc47ba90b01afe468cdd586b0dbe59b64862e2b7.tar.gz lwn-bc47ba90b01afe468cdd586b0dbe59b64862e2b7.zip |
ALSA: drivers: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/mtpav.c')
-rw-r--r-- | sound/drivers/mtpav.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c index 0f6392001e30..547662e02fcc 100644 --- a/sound/drivers/mtpav.c +++ b/sound/drivers/mtpav.c @@ -406,10 +406,10 @@ static void snd_mtpav_input_trigger(struct snd_rawmidi_substream *substream, int * timer interrupt for outputs */ -static void snd_mtpav_output_timer(unsigned long data) +static void snd_mtpav_output_timer(struct timer_list *t) { unsigned long flags; - struct mtpav *chip = (struct mtpav *)data; + struct mtpav *chip = from_timer(chip, t, timer); int p; spin_lock_irqsave(&chip->spinlock, flags); @@ -707,8 +707,7 @@ static int snd_mtpav_probe(struct platform_device *dev) mtp_card->share_irq = 0; mtp_card->inmidistate = 0; mtp_card->outmidihwport = 0xffffffff; - setup_timer(&mtp_card->timer, snd_mtpav_output_timer, - (unsigned long) mtp_card); + timer_setup(&mtp_card->timer, snd_mtpav_output_timer, 0); card->private_free = snd_mtpav_free; |