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>
Tento commit je obsažen v:
@@ -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 */
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele