summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-19 11:29:09 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-19 11:32:26 +0100
commitd80d05fcca1771ff68e0b385459fabb3eb938e98 (patch)
treebfadffdf9e91bc70f2d5632bf3078db9f969b007 /sound
parentf5d5f75fe167c8b80747290968aeaa91457cb10a (diff)
downloadop-kernel-dev-d80d05fcca1771ff68e0b385459fabb3eb938e98.zip
op-kernel-dev-d80d05fcca1771ff68e0b385459fabb3eb938e98.tar.gz
ALSA: serial-u16550: Use setup_timer() and mod_timer()
No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/drivers/serial-u16550.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index 13a34e3..8c1dc73 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -174,9 +174,8 @@ static inline void snd_uart16550_add_timer(struct snd_uart16550 *uart)
{
if (!uart->timer_running) {
/* timer 38600bps * 10bit * 16byte */
- uart->buffer_timer.expires = jiffies + (HZ+255)/256;
+ mod_timer(&uart->buffer_timer, jiffies + (HZ + 255) / 256);
uart->timer_running = 1;
- add_timer(&uart->buffer_timer);
}
}
@@ -830,9 +829,8 @@ 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);
- init_timer(&uart->buffer_timer);
- uart->buffer_timer.function = snd_uart16550_buffer_timer;
- uart->buffer_timer.data = (unsigned long)uart;
+ setup_timer(&uart->buffer_timer, snd_uart16550_buffer_timer,
+ (unsigned long)uart);
uart->timer_running = 0;
/* Register device */
OpenPOWER on IntegriCloud