Changeset 703 for GPL/trunk/alsa-kernel/pci/via82xx_modem.c
- Timestamp:
- Sep 26, 2021, 6:18:40 PM (4 years ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-next merged: 696-702
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/pci/via82xx_modem.c
r695 r703 370 370 while (timeout-- > 0) { 371 371 udelay(1); 372 if (!((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY)) 372 val = snd_via82xx_codec_xread(chip); 373 if (!(val & VIA_REG_AC97_BUSY)) 373 374 return val & 0xffff; 374 375 } … … 739 740 runtime->hw = snd_via82xx_hw; 740 741 741 if ((err = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, 742 &hw_constraints_rates)) < 0) 742 err = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, 743 &hw_constraints_rates); 744 if (err < 0) 743 745 return err; 744 746 745 747 /* we may remove following constaint when we modify table entries 746 748 in interrupt */ 747 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) 749 err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); 750 if (err < 0) 748 751 return err; 749 752 … … 879 882 }; 880 883 881 if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus)) < 0) 884 err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus); 885 if (err < 0) 882 886 return err; 883 887 chip->ac97_bus->private_free = snd_via82xx_mixer_free_ac97_bus; … … 891 895 ac97.num = chip->ac97_secondary; 892 896 893 if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0) 897 err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97); 898 if (err < 0) 894 899 return err; 895 900 … … 972 977 } while (time_before(jiffies, end_time)); 973 978 974 if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_BUSY) 979 val = snd_via82xx_codec_xread(chip); 980 if (val & VIA_REG_AC97_BUSY) 975 981 dev_err(chip->card->dev, 976 982 "AC'97 codec is not ready [0x%x]\n", val); … … 984 990 (VIA_REG_AC97_CODEC_ID_SECONDARY << VIA_REG_AC97_CODEC_ID_SHIFT)); 985 991 do { 986 if ((val = snd_via82xx_codec_xread(chip)) & VIA_REG_AC97_SECONDARY_VALID) { 992 val = snd_via82xx_codec_xread(chip); 993 if (val & VIA_REG_AC97_SECONDARY_VALID) { 987 994 chip->ac97_secondary = 1; 988 995 goto __ac97_ok2; … … 1080 1087 }; 1081 1088 1082 if ((err = pci_enable_device(pci)) < 0) 1089 err = pci_enable_device(pci); 1090 if (err < 0) 1083 1091 return err; 1084 1092 1085 if ((chip = kzalloc(sizeof(*chip), GFP_KERNEL)) == NULL) { 1093 chip = kzalloc(sizeof(*chip), GFP_KERNEL); 1094 if (!chip) { 1086 1095 pci_disable_device(pci); 1087 1096 return -ENOMEM; … … 1093 1102 chip->irq = -1; 1094 1103 1095 if ((err = pci_request_regions(pci, card->driver)) < 0) { 1104 err = pci_request_regions(pci, card->driver); 1105 if (err < 0) { 1096 1106 kfree(chip); 1097 1107 pci_disable_device(pci); … … 1110 1120 chip->ac97_clock = ac97_clock; 1111 1121 1112 if ((err = snd_via82xx_chip_init(chip)) < 0) { 1122 err = snd_via82xx_chip_init(chip); 1123 if (err < 0) { 1113 1124 snd_via82xx_free(chip); 1114 1125 return err; 1115 1126 } 1116 1127 1117 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { 1128 err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); 1129 if (err < 0) { 1118 1130 snd_via82xx_free(chip); 1119 1131 return err; … … 1155 1167 } 1156 1168 1157 if ((err = snd_via82xx_create(card, pci, chip_type, pci->revision, 1158 ac97_clock, &chip)) < 0) 1169 err = snd_via82xx_create(card, pci, chip_type, pci->revision, 1170 ac97_clock, &chip); 1171 if (err < 0) 1159 1172 goto __error; 1160 1173 card->private_data = chip; 1161 if ((err = snd_via82xx_mixer_new(chip)) < 0) 1174 err = snd_via82xx_mixer_new(chip); 1175 if (err < 0) 1162 1176 goto __error; 1163 1177 1164 if ((err = snd_via686_pcm_new(chip)) < 0 ) 1178 err = snd_via686_pcm_new(chip); 1179 if (err < 0) 1165 1180 goto __error; 1166 1181 … … 1174 1189 snd_via82xx_proc_init(chip); 1175 1190 1176 if ((err = snd_card_register(card)) < 0) { 1191 err = snd_card_register(card); 1192 if (err < 0) { 1177 1193 snd_card_free(card); 1178 1194 return err;
Note:
See TracChangeset
for help on using the changeset viewer.