aboutsummaryrefslogtreecommitdiffstats
path: root/sound/sparc/amd7930.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/sparc/amd7930.c')
-rw-r--r--sound/sparc/amd7930.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index 0c63e0585b15..49acee0c4840 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -765,7 +765,6 @@ static int __devinit snd_amd7930_pcm(struct snd_amd7930 *amd)
765 /* playback count */ 1, 765 /* playback count */ 1,
766 /* capture count */ 1, &pcm)) < 0) 766 /* capture count */ 1, &pcm)) < 0)
767 return err; 767 return err;
768 snd_assert(pcm != NULL, return -EINVAL);
769 768
770 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_amd7930_playback_ops); 769 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_amd7930_playback_ops);
771 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_amd7930_capture_ops); 770 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_amd7930_capture_ops);
@@ -788,13 +787,6 @@ static int __devinit snd_amd7930_pcm(struct snd_amd7930 *amd)
788 787
789static int snd_amd7930_info_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem_info *uinfo) 788static int snd_amd7930_info_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem_info *uinfo)
790{ 789{
791 int type = kctl->private_value;
792
793 snd_assert(type == VOLUME_MONITOR ||
794 type == VOLUME_CAPTURE ||
795 type == VOLUME_PLAYBACK, return -EINVAL);
796 (void) type;
797
798 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 790 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
799 uinfo->count = 1; 791 uinfo->count = 1;
800 uinfo->value.integer.min = 0; 792 uinfo->value.integer.min = 0;
@@ -809,10 +801,6 @@ static int snd_amd7930_get_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem
809 int type = kctl->private_value; 801 int type = kctl->private_value;
810 int *swval; 802 int *swval;
811 803
812 snd_assert(type == VOLUME_MONITOR ||
813 type == VOLUME_CAPTURE ||
814 type == VOLUME_PLAYBACK, return -EINVAL);
815
816 switch (type) { 804 switch (type) {
817 case VOLUME_MONITOR: 805 case VOLUME_MONITOR:
818 swval = &amd->mgain; 806 swval = &amd->mgain;
@@ -838,10 +826,6 @@ static int snd_amd7930_put_volume(struct snd_kcontrol *kctl, struct snd_ctl_elem
838 int type = kctl->private_value; 826 int type = kctl->private_value;
839 int *swval, change; 827 int *swval, change;
840 828
841 snd_assert(type == VOLUME_MONITOR ||
842 type == VOLUME_CAPTURE ||
843 type == VOLUME_PLAYBACK, return -EINVAL);
844
845 switch (type) { 829 switch (type) {
846 case VOLUME_MONITOR: 830 case VOLUME_MONITOR:
847 swval = &amd->mgain; 831 swval = &amd->mgain;
@@ -904,7 +888,8 @@ static int __devinit snd_amd7930_mixer(struct snd_amd7930 *amd)
904 struct snd_card *card; 888 struct snd_card *card;
905 int idx, err; 889 int idx, err;
906 890
907 snd_assert(amd != NULL && amd->card != NULL, return -EINVAL); 891 if (snd_BUG_ON(!amd || !amd->card))
892 return -EINVAL;
908 893
909 card = amd->card; 894 card = amd->card;
910 strcpy(card->mixername, card->shortname); 895 strcpy(card->mixername, card->shortname);