diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-19 05:32:51 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-19 05:32:51 -0500 |
commit | 6fec2b57239fa253829912ac0ab76375da8e879d (patch) | |
tree | c312b946843ba6e8fcb3c9478a90453e643ccb31 /sound/pci/asihpi | |
parent | b843ce7425e6c7e5daa731f755373298499c22d4 (diff) |
ALSA: asihpi: 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/asihpi')
-rw-r--r-- | sound/pci/asihpi/asihpi.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index 7a55fefed5c4..e5cd7be85355 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c | |||
@@ -540,9 +540,8 @@ static void snd_card_asihpi_pcm_timer_start(struct snd_pcm_substream * | |||
540 | expiry = HZ / 200; | 540 | expiry = HZ / 200; |
541 | 541 | ||
542 | expiry = max(expiry, 1); /* don't let it be zero! */ | 542 | expiry = max(expiry, 1); /* don't let it be zero! */ |
543 | dpcm->timer.expires = jiffies + expiry; | 543 | mod_timer(&dpcm->timer, jiffies + expiry); |
544 | dpcm->respawn_timer = 1; | 544 | dpcm->respawn_timer = 1; |
545 | add_timer(&dpcm->timer); | ||
546 | } | 545 | } |
547 | 546 | ||
548 | static void snd_card_asihpi_pcm_timer_stop(struct snd_pcm_substream *substream) | 547 | static void snd_card_asihpi_pcm_timer_stop(struct snd_pcm_substream *substream) |
@@ -1064,9 +1063,8 @@ static int snd_card_asihpi_playback_open(struct snd_pcm_substream *substream) | |||
1064 | If internal and other stream playing, can't switch | 1063 | If internal and other stream playing, can't switch |
1065 | */ | 1064 | */ |
1066 | 1065 | ||
1067 | init_timer(&dpcm->timer); | 1066 | setup_timer(&dpcm->timer, snd_card_asihpi_timer_function, |
1068 | dpcm->timer.data = (unsigned long) dpcm; | 1067 | (unsigned long) dpcm); |
1069 | dpcm->timer.function = snd_card_asihpi_timer_function; | ||
1070 | dpcm->substream = substream; | 1068 | dpcm->substream = substream; |
1071 | runtime->private_data = dpcm; | 1069 | runtime->private_data = dpcm; |
1072 | runtime->private_free = snd_card_asihpi_runtime_free; | 1070 | runtime->private_free = snd_card_asihpi_runtime_free; |
@@ -1246,9 +1244,8 @@ static int snd_card_asihpi_capture_open(struct snd_pcm_substream *substream) | |||
1246 | if (err) | 1244 | if (err) |
1247 | return -EIO; | 1245 | return -EIO; |
1248 | 1246 | ||
1249 | init_timer(&dpcm->timer); | 1247 | setup_timer(&dpcm->timer, snd_card_asihpi_timer_function, |
1250 | dpcm->timer.data = (unsigned long) dpcm; | 1248 | (unsigned long) dpcm); |
1251 | dpcm->timer.function = snd_card_asihpi_timer_function; | ||
1252 | dpcm->substream = substream; | 1249 | dpcm->substream = substream; |
1253 | runtime->private_data = dpcm; | 1250 | runtime->private_data = dpcm; |
1254 | runtime->private_free = snd_card_asihpi_runtime_free; | 1251 | runtime->private_free = snd_card_asihpi_runtime_free; |