diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 18:34:29 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-10-24 22:01:16 +0300 |
commit | bc47ba90b01afe468cdd586b0dbe59b64862e2b7 (patch) | |
tree | 67919e97c5af07a8c1467218ea7640e51dd24ce8 /sound/drivers/serial-u16550.c | |
parent | 1a0190157521704c11f8650756388b62f3887eb3 (diff) | |
download | linux-bc47ba90b01afe468cdd586b0dbe59b64862e2b7.tar.xz |
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/serial-u16550.c')
-rw-r--r-- | sound/drivers/serial-u16550.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c index 88e66ea0306d..0a67b8b9f176 100644 --- a/sound/drivers/serial-u16550.c +++ b/sound/drivers/serial-u16550.c @@ -309,12 +309,12 @@ static irqreturn_t snd_uart16550_interrupt(int irq, void *dev_id) } /* When the polling mode, this function calls snd_uart16550_io_loop. */ -static void snd_uart16550_buffer_timer(unsigned long data) +static void snd_uart16550_buffer_timer(struct timer_list *t) { unsigned long flags; struct snd_uart16550 *uart; - uart = (struct snd_uart16550 *)data; + uart = from_timer(uart, t, buffer_timer); spin_lock_irqsave(&uart->open_lock, flags); snd_uart16550_del_timer(uart); snd_uart16550_io_loop(uart); @@ -828,8 +828,7 @@ static int snd_uart16550_create(struct snd_card *card, uart->prev_in = 0; uart->rstatus = 0; memset(uart->prev_status, 0x80, sizeof(unsigned char) * SNDRV_SERIAL_MAX_OUTS); - setup_timer(&uart->buffer_timer, snd_uart16550_buffer_timer, - (unsigned long)uart); + timer_setup(&uart->buffer_timer, snd_uart16550_buffer_timer, 0); uart->timer_running = 0; /* Register device */ |