aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi/asihpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/asihpi/asihpi.c')
-rw-r--r--sound/pci/asihpi/asihpi.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c
index e9273fb2a505..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
548static void snd_card_asihpi_pcm_timer_stop(struct snd_pcm_substream *substream) 547static 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;
@@ -2832,14 +2829,11 @@ static int snd_asihpi_hpi_ioctl(struct snd_hwdep *hw, struct file *file,
2832/* results in /dev/snd/hwC#D0 file for each card with index # 2829/* results in /dev/snd/hwC#D0 file for each card with index #
2833 also /proc/asound/hwdep will contain '#-00: asihpi (HPI) for each card' 2830 also /proc/asound/hwdep will contain '#-00: asihpi (HPI) for each card'
2834*/ 2831*/
2835static int snd_asihpi_hpi_new(struct snd_card_asihpi *asihpi, 2832static int snd_asihpi_hpi_new(struct snd_card_asihpi *asihpi, int device)
2836 int device, struct snd_hwdep **rhwdep)
2837{ 2833{
2838 struct snd_hwdep *hw; 2834 struct snd_hwdep *hw;
2839 int err; 2835 int err;
2840 2836
2841 if (rhwdep)
2842 *rhwdep = NULL;
2843 err = snd_hwdep_new(asihpi->card, "HPI", device, &hw); 2837 err = snd_hwdep_new(asihpi->card, "HPI", device, &hw);
2844 if (err < 0) 2838 if (err < 0)
2845 return err; 2839 return err;
@@ -2849,8 +2843,6 @@ static int snd_asihpi_hpi_new(struct snd_card_asihpi *asihpi,
2849 hw->ops.ioctl = snd_asihpi_hpi_ioctl; 2843 hw->ops.ioctl = snd_asihpi_hpi_ioctl;
2850 hw->ops.release = snd_asihpi_hpi_release; 2844 hw->ops.release = snd_asihpi_hpi_release;
2851 hw->private_data = asihpi; 2845 hw->private_data = asihpi;
2852 if (rhwdep)
2853 *rhwdep = hw;
2854 return 0; 2846 return 0;
2855} 2847}
2856 2848
@@ -2993,7 +2985,7 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev,
2993 2985
2994 /* always create, can be enabled or disabled dynamically 2986 /* always create, can be enabled or disabled dynamically
2995 by enable_hwdep module param*/ 2987 by enable_hwdep module param*/
2996 snd_asihpi_hpi_new(asihpi, 0, NULL); 2988 snd_asihpi_hpi_new(asihpi, 0);
2997 2989
2998 strcpy(card->driver, "ASIHPI"); 2990 strcpy(card->driver, "ASIHPI");
2999 2991