aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/sonicvibes.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-10-17 12:20:26 -0400
committerArjan van de Ven <arjan@linux.intel.com>2008-10-17 12:20:26 -0400
commit651dab4264e4ba0e563f5ff56f748127246e9065 (patch)
tree016630974bdcb00fe529b673f96d389e0fd6dc94 /sound/pci/sonicvibes.c
parent40b8606253552109815786e5d4b0de98782d31f5 (diff)
parent2e532d68a2b3e2aa6b19731501222069735c741c (diff)
Merge commit 'linus/master' into merge-linus
Conflicts: arch/x86/kvm/i8254.c
Diffstat (limited to 'sound/pci/sonicvibes.c')
-rw-r--r--sound/pci/sonicvibes.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c
index 0d3d305b0a0b..cd408b86c839 100644
--- a/sound/pci/sonicvibes.c
+++ b/sound/pci/sonicvibes.c
@@ -534,8 +534,8 @@ static int snd_sonicvibes_hw_constraint_dac_rate(struct snd_pcm_hw_params *param
534 params->rate_den = 1; 534 params->rate_den = 1;
535 } else { 535 } else {
536 snd_sonicvibes_pll(rate, &r, &m, &n); 536 snd_sonicvibes_pll(rate, &r, &m, &n);
537 snd_assert((SV_REFFREQUENCY % 16) == 0, return -EINVAL); 537 snd_BUG_ON(SV_REFFREQUENCY % 16);
538 snd_assert((SV_ADCMULT % 512) == 0, return -EINVAL); 538 snd_BUG_ON(SV_ADCMULT % 512);
539 params->rate_num = (SV_REFFREQUENCY/16) * (n+2) * r; 539 params->rate_num = (SV_REFFREQUENCY/16) * (n+2) * r;
540 params->rate_den = (SV_ADCMULT/512) * (m+2); 540 params->rate_den = (SV_ADCMULT/512) * (m+2);
541 } 541 }
@@ -849,7 +849,8 @@ static int __devinit snd_sonicvibes_pcm(struct sonicvibes * sonic, int device, s
849 849
850 if ((err = snd_pcm_new(sonic->card, "s3_86c617", device, 1, 1, &pcm)) < 0) 850 if ((err = snd_pcm_new(sonic->card, "s3_86c617", device, 1, 1, &pcm)) < 0)
851 return err; 851 return err;
852 snd_assert(pcm != NULL, return -EINVAL); 852 if (snd_BUG_ON(!pcm))
853 return -EINVAL;
853 854
854 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_sonicvibes_playback_ops); 855 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_sonicvibes_playback_ops);
855 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_sonicvibes_capture_ops); 856 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_sonicvibes_capture_ops);
@@ -1089,7 +1090,8 @@ static int __devinit snd_sonicvibes_mixer(struct sonicvibes * sonic)
1089 unsigned int idx; 1090 unsigned int idx;
1090 int err; 1091 int err;
1091 1092
1092 snd_assert(sonic != NULL && sonic->card != NULL, return -EINVAL); 1093 if (snd_BUG_ON(!sonic || !sonic->card))
1094 return -EINVAL;
1093 card = sonic->card; 1095 card = sonic->card;
1094 strcpy(card->mixername, "S3 SonicVibes"); 1096 strcpy(card->mixername, "S3 SonicVibes");
1095 1097