aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-02-28 06:00:48 -0500
committerTakashi Iwai <tiwai@suse.de>2008-04-24 06:00:17 -0400
commitc74056d437401dc7d43970cd845c34a7e28723c0 (patch)
tree5675ff889b604382b20231fc7960d4be0eebe01f /sound
parent608b10bad3563e2349393136ce421d9f67329170 (diff)
[ALSA] sound: ali5451.c fix shadowed variable warnings
enable is used to test for whether or not spdif should be enabled, change to spdif_enable. sound/pci/ali5451/ali5451.c:1812:15: warning: symbol 'enable' shadows an earlier one sound/pci/ali5451/ali5451.c:63:12: originally declared here sound/pci/ali5451/ali5451.c:1840:27: warning: symbol 'enable' shadows an earlier one sound/pci/ali5451/ali5451.c:63:12: originally declared here Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/ali5451/ali5451.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index 6a905ed9cbd6..fc04d3da1af5 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -1809,26 +1809,26 @@ static int snd_ali5451_spdif_get(struct snd_kcontrol *kcontrol,
1809 struct snd_ctl_elem_value *ucontrol) 1809 struct snd_ctl_elem_value *ucontrol)
1810{ 1810{
1811 struct snd_ali *codec = kcontrol->private_data; 1811 struct snd_ali *codec = kcontrol->private_data;
1812 unsigned int enable; 1812 unsigned int spdif_enable;
1813 1813
1814 enable = ucontrol->value.integer.value[0] ? 1 : 0; 1814 spdif_enable = ucontrol->value.integer.value[0] ? 1 : 0;
1815 1815
1816 spin_lock_irq(&codec->reg_lock); 1816 spin_lock_irq(&codec->reg_lock);
1817 switch (kcontrol->private_value) { 1817 switch (kcontrol->private_value) {
1818 case 0: 1818 case 0:
1819 enable = (codec->spdif_mask & 0x02) ? 1 : 0; 1819 spdif_enable = (codec->spdif_mask & 0x02) ? 1 : 0;
1820 break; 1820 break;
1821 case 1: 1821 case 1:
1822 enable = ((codec->spdif_mask & 0x02) && 1822 spdif_enable = ((codec->spdif_mask & 0x02) &&
1823 (codec->spdif_mask & 0x04)) ? 1 : 0; 1823 (codec->spdif_mask & 0x04)) ? 1 : 0;
1824 break; 1824 break;
1825 case 2: 1825 case 2:
1826 enable = (codec->spdif_mask & 0x01) ? 1 : 0; 1826 spdif_enable = (codec->spdif_mask & 0x01) ? 1 : 0;
1827 break; 1827 break;
1828 default: 1828 default:
1829 break; 1829 break;
1830 } 1830 }
1831 ucontrol->value.integer.value[0] = enable; 1831 ucontrol->value.integer.value[0] = spdif_enable;
1832 spin_unlock_irq(&codec->reg_lock); 1832 spin_unlock_irq(&codec->reg_lock);
1833 return 0; 1833 return 0;
1834} 1834}
@@ -1837,17 +1837,17 @@ static int snd_ali5451_spdif_put(struct snd_kcontrol *kcontrol,
1837 struct snd_ctl_elem_value *ucontrol) 1837 struct snd_ctl_elem_value *ucontrol)
1838{ 1838{
1839 struct snd_ali *codec = kcontrol->private_data; 1839 struct snd_ali *codec = kcontrol->private_data;
1840 unsigned int change = 0, enable = 0; 1840 unsigned int change = 0, spdif_enable = 0;
1841 1841
1842 enable = ucontrol->value.integer.value[0] ? 1 : 0; 1842 spdif_enable = ucontrol->value.integer.value[0] ? 1 : 0;
1843 1843
1844 spin_lock_irq(&codec->reg_lock); 1844 spin_lock_irq(&codec->reg_lock);
1845 switch (kcontrol->private_value) { 1845 switch (kcontrol->private_value) {
1846 case 0: 1846 case 0:
1847 change = (codec->spdif_mask & 0x02) ? 1 : 0; 1847 change = (codec->spdif_mask & 0x02) ? 1 : 0;
1848 change = change ^ enable; 1848 change = change ^ spdif_enable;
1849 if (change) { 1849 if (change) {
1850 if (enable) { 1850 if (spdif_enable) {
1851 codec->spdif_mask |= 0x02; 1851 codec->spdif_mask |= 0x02;
1852 snd_ali_enable_spdif_out(codec); 1852 snd_ali_enable_spdif_out(codec);
1853 } else { 1853 } else {
@@ -1859,9 +1859,9 @@ static int snd_ali5451_spdif_put(struct snd_kcontrol *kcontrol,
1859 break; 1859 break;
1860 case 1: 1860 case 1:
1861 change = (codec->spdif_mask & 0x04) ? 1 : 0; 1861 change = (codec->spdif_mask & 0x04) ? 1 : 0;
1862 change = change ^ enable; 1862 change = change ^ spdif_enable;
1863 if (change && (codec->spdif_mask & 0x02)) { 1863 if (change && (codec->spdif_mask & 0x02)) {
1864 if (enable) { 1864 if (spdif_enable) {
1865 codec->spdif_mask |= 0x04; 1865 codec->spdif_mask |= 0x04;
1866 snd_ali_enable_spdif_chnout(codec); 1866 snd_ali_enable_spdif_chnout(codec);
1867 } else { 1867 } else {
@@ -1872,9 +1872,9 @@ static int snd_ali5451_spdif_put(struct snd_kcontrol *kcontrol,
1872 break; 1872 break;
1873 case 2: 1873 case 2:
1874 change = (codec->spdif_mask & 0x01) ? 1 : 0; 1874 change = (codec->spdif_mask & 0x01) ? 1 : 0;
1875 change = change ^ enable; 1875 change = change ^ spdif_enable;
1876 if (change) { 1876 if (change) {
1877 if (enable) { 1877 if (spdif_enable) {
1878 codec->spdif_mask |= 0x01; 1878 codec->spdif_mask |= 0x01;
1879 snd_ali_enable_spdif_in(codec); 1879 snd_ali_enable_spdif_in(codec);
1880 } else { 1880 } else {