aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652/hdspm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-19 05:34:45 -0500
committerTakashi Iwai <tiwai@suse.de>2015-01-19 05:34:45 -0500
commit04018e137c298f199fbf0f0c431d975f584f4702 (patch)
tree3ad379717d757126b067f5fca01d90e1b40be598 /sound/pci/rme9652/hdspm.c
parentc41c009ed5f0d20ab4cbdff37ddbfd072c3c2d92 (diff)
ALSA: hdspm: 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/pci/rme9652/hdspm.c')
-rw-r--r--sound/pci/rme9652/hdspm.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 8109b8e5f6ef..1716323fed9c 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -1957,10 +1957,8 @@ static void snd_hdspm_midi_output_timer(unsigned long data)
1957 leaving istimer wherever it was set before. 1957 leaving istimer wherever it was set before.
1958 */ 1958 */
1959 1959
1960 if (hmidi->istimer) { 1960 if (hmidi->istimer)
1961 hmidi->timer.expires = 1 + jiffies; 1961 mod_timer(&hmidi->timer, 1 + jiffies);
1962 add_timer(&hmidi->timer);
1963 }
1964 1962
1965 spin_unlock_irqrestore (&hmidi->lock, flags); 1963 spin_unlock_irqrestore (&hmidi->lock, flags);
1966} 1964}
@@ -1975,11 +1973,9 @@ snd_hdspm_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
1975 spin_lock_irqsave (&hmidi->lock, flags); 1973 spin_lock_irqsave (&hmidi->lock, flags);
1976 if (up) { 1974 if (up) {
1977 if (!hmidi->istimer) { 1975 if (!hmidi->istimer) {
1978 init_timer(&hmidi->timer); 1976 setup_timer(&hmidi->timer, snd_hdspm_midi_output_timer,
1979 hmidi->timer.function = snd_hdspm_midi_output_timer; 1977 (unsigned long) hmidi);
1980 hmidi->timer.data = (unsigned long) hmidi; 1978 mod_timer(&hmidi->timer, 1 + jiffies);
1981 hmidi->timer.expires = 1 + jiffies;
1982 add_timer(&hmidi->timer);
1983 hmidi->istimer++; 1979 hmidi->istimer++;
1984 } 1980 }
1985 } else { 1981 } else {