Signed-off-by: Daniel Marjamäki <daniel.marjamaki@xxxxxxxxx>
--- linux-2.6.20-rc2/sound/pci/ac97/ac97_codec.c 2006-12-27
10:00:04.000000000 +0100
+++ linux/sound/pci/ac97/ac97_codec.c 2006-12-28 10:08:47.000000000 +0100
@@ -205,24 +205,16 @@ static int snd_ac97_valid_reg(struct snd
switch (ac97->id) {
case AC97_ID_AK4540:
case AC97_ID_AK4542:
- if (reg <= 0x1c || reg == 0x20 || reg == 0x26 || reg >= 0x7c)
- return 1;
- return 0;
+ return (reg <= 0x1c || reg == 0x20 || reg == 0x26 || reg >= 0x7c);
case AC97_ID_AD1819: /* AD1819 */
case AC97_ID_AD1881: /* AD1881 */
case AC97_ID_AD1881A: /* AD1881A */
- if (reg >= 0x3a && reg <= 0x6e) /* 0x59 */
- return 0;
- return 1;
+ return (reg < 0x3a || reg > 0x6e); /* 0x59 */
case AC97_ID_AD1885: /* AD1885 */
case AC97_ID_AD1886: /* AD1886 */
case AC97_ID_AD1886A: /* AD1886A - !!verify!! --jk */
case AC97_ID_AD1887: /* AD1887 - !!verify!! --jk */
- if (reg == 0x5a)
- return 1;
- if (reg >= 0x3c && reg <= 0x6e) /* 0x59 */
- return 0;
- return 1;
+ return (reg == 0x5a || reg < 0x3c || reg > 0x6e); /* 0x59 */
case AC97_ID_STAC9700:
case AC97_ID_STAC9704:
case AC97_ID_STAC9705:
@@ -230,9 +222,7 @@ static int snd_ac97_valid_reg(struct snd
case AC97_ID_STAC9721:
case AC97_ID_STAC9744:
case AC97_ID_STAC9756:
- if (reg <= 0x3a || reg >= 0x5a)
- return 1;
- return 0;
+ return (reg <= 0x3a || reg >= 0x5a);
}
return 1;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-sound" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]